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

Side by Side Diff: cc/layer.h

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compile error Created 8 years, 1 month 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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 #ifndef CC_LAYER_H_ 5 #ifndef CC_LAYER_H_
6 #define CC_LAYER_H_ 6 #define CC_LAYER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/layer_animation_controller.h" 10 #include "cc/layer_animation_controller.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 void setDoubleSided(bool); 167 void setDoubleSided(bool);
168 bool doubleSided() const { return m_doubleSided; } 168 bool doubleSided() const { return m_doubleSided; }
169 169
170 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; } 170 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; }
171 bool preserves3D() const { return m_preserves3D; } 171 bool preserves3D() const { return m_preserves3D; }
172 172
173 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us eParentBackfaceVisibility = useParentBackfaceVisibility; } 173 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us eParentBackfaceVisibility = useParentBackfaceVisibility; }
174 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil ity; } 174 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil ity; }
175 175
176 virtual void setUseLCDText(bool); 176 virtual void setCanUseLCDText(bool);
177 bool useLCDText() const { return m_useLCDText; } 177 bool canUseLCDText() const { return m_canUseLCDText; }
178 178
179 virtual void setLayerTreeHost(LayerTreeHost*); 179 virtual void setLayerTreeHost(LayerTreeHost*);
180 180
181 bool hasContributingDelegatedRenderPasses() const { return false; } 181 bool hasContributingDelegatedRenderPasses() const { return false; }
182 182
183 void setIsDrawable(bool); 183 void setIsDrawable(bool);
184 184
185 void setReplicaLayer(Layer*); 185 void setReplicaLayer(Layer*);
186 Layer* replicaLayer() const { return m_replicaLayer.get(); } 186 Layer* replicaLayer() const { return m_replicaLayer.get(); }
187 187
(...skipping 16 matching lines...) Expand all
204 204
205 void clearRenderSurface() { m_renderSurface.reset(); } 205 void clearRenderSurface() { m_renderSurface.reset(); }
206 RenderSurface* renderSurface() const { return m_renderSurface.get(); } 206 RenderSurface* renderSurface() const { return m_renderSurface.get(); }
207 void createRenderSurface(); 207 void createRenderSurface();
208 208
209 float drawOpacity() const { return m_drawOpacity; } 209 float drawOpacity() const { return m_drawOpacity; }
210 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } 210 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; }
211 211
212 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } 212 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; }
213 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; } 213 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; }
214 bool screenSpaceOpacityIsAnimating() const { return m_screenSpaceOpacityIsAn imating; }
215 void setScreenSpaceOpacityIsAnimating(bool animating) { m_screenSpaceOpacity IsAnimating = animating; }
214 216
215 Layer* renderTarget() const { DCHECK(!m_renderTarget || m_renderTarget->rend erSurface()); return m_renderTarget; } 217 Layer* renderTarget() const { DCHECK(!m_renderTarget || m_renderTarget->rend erSurface()); return m_renderTarget; }
216 void setRenderTarget(Layer* target) { m_renderTarget = target; } 218 void setRenderTarget(Layer* target) { m_renderTarget = target; }
217 219
218 bool drawTransformIsAnimating() const { return m_drawTransformIsAnimating; } 220 bool drawTransformIsAnimating() const { return m_drawTransformIsAnimating; }
219 void setDrawTransformIsAnimating(bool animating) { m_drawTransformIsAnimatin g = animating; } 221 void setDrawTransformIsAnimating(bool animating) { m_drawTransformIsAnimatin g = animating; }
220 bool screenSpaceTransformIsAnimating() const { return m_screenSpaceTransform IsAnimating; } 222 bool screenSpaceTransformIsAnimating() const { return m_screenSpaceTransform IsAnimating; }
221 void setScreenSpaceTransformIsAnimating(bool animating) { m_screenSpaceTrans formIsAnimating = animating; } 223 void setScreenSpaceTransformIsAnimating(bool animating) { m_screenSpaceTrans formIsAnimating = animating; }
222 224
223 // This moves from layer space, with origin in the center to target space wi th origin in the top left. 225 // This moves from layer space, with origin in the center to target space wi th origin in the top left.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 SkImageFilter* m_filter; 368 SkImageFilter* m_filter;
367 WebKit::WebFilterOperations m_filters; 369 WebKit::WebFilterOperations m_filters;
368 WebKit::WebFilterOperations m_backgroundFilters; 370 WebKit::WebFilterOperations m_backgroundFilters;
369 float m_anchorPointZ; 371 float m_anchorPointZ;
370 bool m_isContainerForFixedPositionLayers; 372 bool m_isContainerForFixedPositionLayers;
371 bool m_fixedToContainerLayer; 373 bool m_fixedToContainerLayer;
372 bool m_isDrawable; 374 bool m_isDrawable;
373 bool m_masksToBounds; 375 bool m_masksToBounds;
374 bool m_contentsOpaque; 376 bool m_contentsOpaque;
375 bool m_doubleSided; 377 bool m_doubleSided;
376 bool m_useLCDText; 378 bool m_canUseLCDText;
377 bool m_preserves3D; 379 bool m_preserves3D;
378 bool m_useParentBackfaceVisibility; 380 bool m_useParentBackfaceVisibility;
379 bool m_drawCheckerboardForMissingTiles; 381 bool m_drawCheckerboardForMissingTiles;
380 bool m_forceRenderSurface; 382 bool m_forceRenderSurface;
381 383
382 WebKit::WebTransformationMatrix m_transform; 384 WebKit::WebTransformationMatrix m_transform;
383 WebKit::WebTransformationMatrix m_sublayerTransform; 385 WebKit::WebTransformationMatrix m_sublayerTransform;
384 386
385 // Replica layer used for reflections. 387 // Replica layer used for reflections.
386 scoped_refptr<Layer> m_replicaLayer; 388 scoped_refptr<Layer> m_replicaLayer;
387 389
388 // Transient properties. 390 // Transient properties.
389 scoped_ptr<RenderSurface> m_renderSurface; 391 scoped_ptr<RenderSurface> m_renderSurface;
390 float m_drawOpacity; 392 float m_drawOpacity;
391 bool m_drawOpacityIsAnimating; 393 bool m_drawOpacityIsAnimating;
394 bool m_screenSpaceOpacityIsAnimating;
392 395
393 Layer* m_renderTarget; 396 Layer* m_renderTarget;
394 397
395 WebKit::WebTransformationMatrix m_drawTransform; 398 WebKit::WebTransformationMatrix m_drawTransform;
396 WebKit::WebTransformationMatrix m_screenSpaceTransform; 399 WebKit::WebTransformationMatrix m_screenSpaceTransform;
397 bool m_drawTransformIsAnimating; 400 bool m_drawTransformIsAnimating;
398 bool m_screenSpaceTransformIsAnimating; 401 bool m_screenSpaceTransformIsAnimating;
399 402
400 // Uses target surface space. 403 // Uses target surface space.
401 gfx::Rect m_drawableContentRect; 404 gfx::Rect m_drawableContentRect;
402 float m_rasterScale; 405 float m_rasterScale;
403 bool m_automaticallyComputeRasterScale; 406 bool m_automaticallyComputeRasterScale;
404 bool m_boundsContainPageScale; 407 bool m_boundsContainPageScale;
405 408
406 WebKit::WebTransformationMatrix m_implTransform; 409 WebKit::WebTransformationMatrix m_implTransform;
407 410
408 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; 411 WebKit::WebAnimationDelegate* m_layerAnimationDelegate;
409 WebKit::WebLayerScrollClient* m_layerScrollClient; 412 WebKit::WebLayerScrollClient* m_layerScrollClient;
410 }; 413 };
411 414
412 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); 415 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*);
413 416
414 } // namespace cc 417 } // namespace cc
415 418
416 #endif // CC_LAYER_H_ 419 #endif // CC_LAYER_H_
OLDNEW
« no previous file with comments | « cc/damage_tracker_unittest.cc ('k') | cc/layer.cc » ('j') | cc/layer_tree_host_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698