Bug 1556468. Use the DrawTarget's offset when calculating the clip. r=mstange
authorJeff Muizelaar <jrmuizel@gmail.com>
Thu, 06 Jun 2019 14:12:31 +0000
changeset 477641 2d1aee4b08dce145e96fabaf8cadc3cc69a296f8
parent 477640 201f4f4fe86e48f9d6b2ce27b728e3bbe11c89c0
child 477642 3c6929ada62be8fb77ba48cb474e3425f67f1332
push id36119
push userncsoregi@mozilla.com
push dateThu, 06 Jun 2019 21:52:09 +0000
treeherdermozilla-central@6a81efd823db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1556468
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1556468. Use the DrawTarget's offset when calculating the clip. r=mstange The code currently assumes an offset of 0,0 Differential Revision: https://phabricator.services.mozilla.com/D33525
gfx/thebes/gfxContext.cpp
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -848,17 +848,18 @@ void gfxContext::ChangeTransform(const M
   }
 
   mTransform = aNewMatrix;
 
   mDT->SetTransform(GetDTTransform());
 }
 
 Rect gfxContext::GetAzureDeviceSpaceClipBounds() const {
-  Rect rect(CurrentState().deviceOffset.x, CurrentState().deviceOffset.y,
+  Rect rect(CurrentState().deviceOffset.x + Float(mDT->GetRect().x),
+            CurrentState().deviceOffset.y + Float(mDT->GetRect().y),
             Float(mDT->GetSize().width), Float(mDT->GetSize().height));
   for (unsigned int i = 0; i < mStateStack.Length(); i++) {
     for (unsigned int c = 0; c < mStateStack[i].pushedClips.Length(); c++) {
       const AzureState::PushedClip& clip = mStateStack[i].pushedClips[c];
       if (clip.path) {
         Rect bounds = clip.path->GetBounds(clip.transform);
         rect.IntersectRect(rect, bounds);
       } else {