Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 98663004: Add support for unprefixed CSS Transforms (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/rendering/compositing/CompositingReasonFinder.h" 6 #include "core/rendering/compositing/CompositingReasonFinder.h"
7 7
8 #include "CSSPropertyNames.h" 8 #include "CSSPropertyNames.h"
9 #include "HTMLNames.h" 9 #include "HTMLNames.h"
10 #include "core/animation/ActiveAnimations.h" 10 #include "core/animation/ActiveAnimations.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 bool CompositingReasonFinder::requiresCompositingForAnimation(RenderObject* rend erer) const 148 bool CompositingReasonFinder::requiresCompositingForAnimation(RenderObject* rend erer) const
149 { 149 {
150 if (!(m_compositingTriggers & AnimationTrigger)) 150 if (!(m_compositingTriggers & AnimationTrigger))
151 return false; 151 return false;
152 152
153 return shouldCompositeForActiveAnimations(*renderer); 153 return shouldCompositeForActiveAnimations(*renderer);
154 } 154 }
155 155
156 bool CompositingReasonFinder::requiresCompositingForTransition(RenderObject* ren derer) const
157 {
158 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
159 return false;
160
161 if (Settings* settings = m_renderView.document().settings()) {
162 if (!settings->acceleratedCompositingForTransitionEnabled())
163 return false;
164 }
165
166 return renderer->style()->transitionForProperty(CSSPropertyOpacity)
167 || renderer->style()->transitionForProperty(CSSPropertyWebkitFilter)
168 || renderer->style()->transitionForProperty(CSSPropertyTransform)
169 || renderer->style()->transitionForProperty(CSSPropertyWebkitTransform);
170 }
171
156 bool CompositingReasonFinder::requiresCompositingForFilters(RenderObject* render er) const 172 bool CompositingReasonFinder::requiresCompositingForFilters(RenderObject* render er) const
157 { 173 {
158 if (!(m_compositingTriggers & FilterTrigger)) 174 if (!(m_compositingTriggers & FilterTrigger))
159 return false; 175 return false;
160 176
161 return renderer->hasFilter(); 177 return renderer->hasFilter();
162 } 178 }
163 179
164 bool CompositingReasonFinder::requiresCompositingForOverflowScrollingParent(cons t RenderLayer* layer) const 180 bool CompositingReasonFinder::requiresCompositingForOverflowScrollingParent(cons t RenderLayer* layer) const
165 { 181 {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 317
302 return true; 318 return true;
303 } 319 }
304 320
305 bool CompositingReasonFinder::requiresCompositingForOverflowScrolling(const Rend erLayer* layer) const 321 bool CompositingReasonFinder::requiresCompositingForOverflowScrolling(const Rend erLayer* layer) const
306 { 322 {
307 return layer->needsCompositedScrolling(); 323 return layer->needsCompositedScrolling();
308 } 324 }
309 325
310 } 326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698