Closed Bug 899884 Opened 11 years ago Closed 11 years ago

Mask layers broken when zooming

Categories

(Core :: Graphics: Layers, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dzbarsky, Assigned: nrc)

Details

Attachments

(2 files, 1 obsolete file)

Attached file scroll-1-ref.html
See attached testcase.  Zoom in (mask is not applied correctly), then refresh.
This happens with the OGL compositor, haven't tested on other platforms.
Attached patch fix (obsolete) — Splinter Review
Assignee: nobody → ncameron
Attachment #787956 - Flags: review?(roc)
Comment on attachment 787956 [details] [diff] [review]
fix

># HG changeset patch
># Parent 45128af1773980dc890cd698bed16678f9413547
># User Nicholas Cameron <ncameron@mozilla.com>
>Bug 899884. Take into account the app unit to dev pixel ratio when reusing mask layers. r=roc
>

>--- a/layout/style/nsAnimationManager.cpp
>+++ b/layout/style/nsAnimationManager.cpp
>@@ -538,17 +538,21 @@ nsAnimationManager::SizeOfIncludingThis(
> {
>   return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
> }
> 
> nsIStyleRule*
> nsAnimationManager::CheckAnimationRule(nsStyleContext* aStyleContext,
>                                        mozilla::dom::Element* aElement)
> {
>-  if (!mPresContext->IsProcessingAnimationStyleChange()) {
>+  static int count = 0;
>+  count++;
>+
>+  if (count > 10 && !mPresContext->IsProcessingAnimationStyleChange()) {
>+    count = 0;
>     if (!mPresContext->IsDynamic()) {
>       // For print or print preview, ignore animations.
>       return nullptr;
>     }
> 
>     // Everything that causes our animation data to change triggers a
>     // style change, which in turn triggers a non-animation restyle.
>     // Likewise, when we initially construct frames, we're not in a
>@@ -978,19 +982,20 @@ nsAnimationManager::GetAnimationRule(moz
> 
>     if (ea->mStyleRule) {
>       ea->PostRestyleForAnimation(mPresContext);
>     }
> 
>     return nullptr;
>   }
> 
>-  NS_WARN_IF_FALSE(ea->mStyleRuleRefreshTime ==
>-                     mPresContext->RefreshDriver()->MostRecentRefresh(),
>-                   "should already have refreshed style rule");
>+  if (ea->mStyleRuleRefreshTime !=
>+                     mPresContext->RefreshDriver()->MostRecentRefresh()) {
>+    printf("Whoops!\n");
>+  }
> 
>   return ea->mStyleRule;
> }
> 
> /* virtual */ void
> nsAnimationManager::WillRefresh(mozilla::TimeStamp aTime)
> {
>   NS_ABORT_IF_FALSE(mPresContext,

Oh good, you're trying to figure out the gaia thing! ;)
Attached patch fixSplinter Review
Without debugging crap from another bug this time. Thanks dzbarsky!
Attachment #787956 - Attachment is obsolete: true
Attachment #787956 - Flags: review?(roc)
Attachment #787961 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/ef5be82e9690
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: