Skip to content

Commit

Permalink
Bug 1289829 - Change mask SurfaceSize calculation r=mattwoodrow
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotaro Ikeda committed Aug 18, 2016
1 parent 9ec2ced commit 3cb828d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gfx/layers/apz/test/reftest/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ skip-if(!asyncPan) fuzzy-if(Android,6,8) == async-scrollbar-1-h.html async-scrol
skip-if(!asyncPan) fuzzy-if(Android,6,8) == async-scrollbar-1-vh.html async-scrollbar-1-vh-ref.html
skip-if(!asyncPan) fuzzy-if(Android,6,8) == async-scrollbar-1-v-rtl.html async-scrollbar-1-v-rtl-ref.html
skip-if(!asyncPan) fuzzy-if(Android,13,8) == async-scrollbar-1-h-rtl.html async-scrollbar-1-h-rtl-ref.html
skip-if(!asyncPan) fuzzy-if(Android,8,10) == async-scrollbar-1-vh-rtl.html async-scrollbar-1-vh-rtl-ref.html
skip-if(!asyncPan) fuzzy-if(Android,8,11) == async-scrollbar-1-vh-rtl.html async-scrollbar-1-vh-rtl-ref.html

# Different async zoom levels. Since the scrollthumb gets async-scaled in the
# compositor, the border-radius ends of the scrollthumb are going to be a little
Expand Down
9 changes: 7 additions & 2 deletions layout/base/FrameLayerBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6062,8 +6062,14 @@ ContainerState::CreateMaskLayer(Layer *aLayer,

uint32_t maxSize = mManager->GetMaxTextureSize();
NS_ASSERTION(maxSize > 0, "Invalid max texture size");
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
// Make mask image width aligned to 4. See Bug 1245552.
gfx::Size surfaceSize(std::min<gfx::Float>(GetAlignedStride<4>(NSToIntCeil(boundingRect.Width())), maxSize),
std::min<gfx::Float>(boundingRect.Height(), maxSize));
#else
gfx::Size surfaceSize(std::min<gfx::Float>(boundingRect.Width(), maxSize),
std::min<gfx::Float>(boundingRect.Height(), maxSize));
#endif

// maskTransform is applied to the clip when it is painted into the mask (as a
// component of imageTransform), and its inverse used when the mask is used for
Expand Down Expand Up @@ -6097,8 +6103,7 @@ ContainerState::CreateMaskLayer(Layer *aLayer,
GetMaskLayerImageCache()->FindImageFor(&lookupKey);

if (!container) {
// Make mask image width aligned to 4. See Bug 1245552.
IntSize surfaceSizeInt(GetAlignedStride<4>(NSToIntCeil(surfaceSize.width)),
IntSize surfaceSizeInt(NSToIntCeil(surfaceSize.width),
NSToIntCeil(surfaceSize.height));
// no existing mask image, so build a new one
MaskImageData imageData(surfaceSizeInt, mManager);
Expand Down
2 changes: 1 addition & 1 deletion layout/reftests/bugs/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ skip-if(B2G||Mulet) == 1150021-1.xul 1150021-1-ref.xul
== 1155828-1.html 1155828-1-ref.html
== 1156129-1.html 1156129-1-ref.html
pref(dom.use_xbl_scopes_for_remote_xul,true) HTTP(..) == 1157127-1.html 1157127-1-ref.html
== 1169331-1.html 1169331-1-ref.html
fuzzy-if(Android,1,1) == 1169331-1.html 1169331-1-ref.html
fuzzy(1,74) fuzzy-if(gtkWidget,6,79) == 1174332-1.html 1174332-1-ref.html
== 1179078-1.html 1179078-1-ref.html
== 1179288-1.html 1179288-1-ref.html
Expand Down

0 comments on commit 3cb828d

Please sign in to comment.