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

Side by Side Diff: cc/layer.h

Issue 12093067: Handle ui::Layer's visibility using cc::Layer's m_isDrawable flag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | cc/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us eParentBackfaceVisibility = useParentBackfaceVisibility; } 192 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us eParentBackfaceVisibility = useParentBackfaceVisibility; }
193 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil ity; } 193 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil ity; }
194 194
195 virtual void setLayerTreeHost(LayerTreeHost*); 195 virtual void setLayerTreeHost(LayerTreeHost*);
196 196
197 bool hasDelegatedContent() const { return false; } 197 bool hasDelegatedContent() const { return false; }
198 bool hasContributingDelegatedRenderPasses() const { return false; } 198 bool hasContributingDelegatedRenderPasses() const { return false; }
199 199
200 void setIsDrawable(bool); 200 void setIsDrawable(bool);
201 201
202 void setVisible(bool);
piman 2013/01/30 21:38:50 Nit: we may want to name that as "setSubtreeVisibl
203 bool visible() const { return m_visible; }
204
202 void setReplicaLayer(Layer*); 205 void setReplicaLayer(Layer*);
203 Layer* replicaLayer() { return m_replicaLayer.get(); } 206 Layer* replicaLayer() { return m_replicaLayer.get(); }
204 const Layer* replicaLayer() const { return m_replicaLayer.get(); } 207 const Layer* replicaLayer() const { return m_replicaLayer.get(); }
205 208
206 bool hasMask() const { return !!m_maskLayer; } 209 bool hasMask() const { return !!m_maskLayer; }
207 bool hasReplica() const { return !!m_replicaLayer; } 210 bool hasReplica() const { return !!m_replicaLayer; }
208 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep licaLayer->m_maskLayer); } 211 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep licaLayer->m_maskLayer); }
209 212
210 // These methods typically need to be overwritten by derived classes. 213 // These methods typically need to be overwritten by derived classes.
211 virtual bool drawsContent() const; 214 virtual bool drawsContent() const;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 SkColor m_backgroundColor; 375 SkColor m_backgroundColor;
373 std::string m_debugName; 376 std::string m_debugName;
374 float m_opacity; 377 float m_opacity;
375 skia::RefPtr<SkImageFilter> m_filter; 378 skia::RefPtr<SkImageFilter> m_filter;
376 WebKit::WebFilterOperations m_filters; 379 WebKit::WebFilterOperations m_filters;
377 WebKit::WebFilterOperations m_backgroundFilters; 380 WebKit::WebFilterOperations m_backgroundFilters;
378 float m_anchorPointZ; 381 float m_anchorPointZ;
379 bool m_isContainerForFixedPositionLayers; 382 bool m_isContainerForFixedPositionLayers;
380 bool m_fixedToContainerLayer; 383 bool m_fixedToContainerLayer;
381 bool m_isDrawable; 384 bool m_isDrawable;
385 bool m_visible;
382 bool m_masksToBounds; 386 bool m_masksToBounds;
383 bool m_contentsOpaque; 387 bool m_contentsOpaque;
384 bool m_doubleSided; 388 bool m_doubleSided;
385 bool m_preserves3D; 389 bool m_preserves3D;
386 bool m_useParentBackfaceVisibility; 390 bool m_useParentBackfaceVisibility;
387 bool m_drawCheckerboardForMissingTiles; 391 bool m_drawCheckerboardForMissingTiles;
388 bool m_forceRenderSurface; 392 bool m_forceRenderSurface;
389 393
390 gfx::Transform m_transform; 394 gfx::Transform m_transform;
391 gfx::Transform m_sublayerTransform; 395 gfx::Transform m_sublayerTransform;
(...skipping 12 matching lines...) Expand all
404 WebKit::WebLayerScrollClient* m_layerScrollClient; 408 WebKit::WebLayerScrollClient* m_layerScrollClient;
405 409
406 DrawProperties<Layer, RenderSurface> m_drawProperties; 410 DrawProperties<Layer, RenderSurface> m_drawProperties;
407 }; 411 };
408 412
409 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); 413 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*);
410 414
411 } // namespace cc 415 } // namespace cc
412 416
413 #endif // CC_LAYER_H_ 417 #endif // CC_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698