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

Side by Side Diff: cc/layer.h

Issue 12326022: Efficiently handle image layer scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add black-box tests 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
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 bool hasReplica() const { return !!m_replicaLayer; } 207 bool hasReplica() const { return !!m_replicaLayer; }
208 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep licaLayer->m_maskLayer); } 208 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep licaLayer->m_maskLayer); }
209 209
210 // These methods typically need to be overwritten by derived classes. 210 // These methods typically need to be overwritten by derived classes.
211 virtual bool drawsContent() const; 211 virtual bool drawsContent() const;
212 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats*) { } 212 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats*) { }
213 virtual bool needMoreUpdates(); 213 virtual bool needMoreUpdates();
214 virtual void setIsMask(bool) { } 214 virtual void setIsMask(bool) { }
215 215
216 void setDebugName(const std::string&); 216 void setDebugName(const std::string&);
217 std::string debugName() const { return m_debugName; }
enne (OOO) 2013/02/22 23:53:32 Not needed.
Xianzhu 2013/02/23 00:56:19 Done.
217 218
218 virtual void pushPropertiesTo(LayerImpl*); 219 virtual void pushPropertiesTo(LayerImpl*);
219 220
220 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } 221 void clearRenderSurface() { m_drawProperties.render_surface.reset(); }
221 void createRenderSurface(); 222 void createRenderSurface();
222 223
223 // The contentsScale converts from logical, non-page-scaled pixels to target pixels. 224 // The contentsScale converts from logical, non-page-scaled pixels to target pixels.
224 // The contentsScale is 1 for the root layer as it is already in physical pi xels. 225 // The contentsScale is 1 for the root layer as it is already in physical pi xels.
225 // By default contentsScale is forced to be 1 except for subclasses of Conte ntsScalingLayer. 226 // By default contentsScale is forced to be 1 except for subclasses of Conte ntsScalingLayer.
226 float contentsScaleX() const { return m_drawProperties.contents_scale_x; } 227 float contentsScaleX() const { return m_drawProperties.contents_scale_x; }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 WebKit::WebLayerScrollClient* m_layerScrollClient; 406 WebKit::WebLayerScrollClient* m_layerScrollClient;
406 407
407 DrawProperties<Layer, RenderSurface> m_drawProperties; 408 DrawProperties<Layer, RenderSurface> m_drawProperties;
408 }; 409 };
409 410
410 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); 411 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*);
411 412
412 } // namespace cc 413 } // namespace cc
413 414
414 #endif // CC_LAYER_H_ 415 #endif // CC_LAYER_H_
OLDNEW
« no previous file with comments | « cc/debug_colors.cc ('k') | cc/picture_image_layer.h » ('j') | cc/picture_image_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698