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

Side by Side Diff: cc/layer_impl.h

Issue 11447028: cc: Split out calcDrawEtc from drawLayers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years 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
« no previous file with comments | « no previous file | cc/layer_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_IMPL_H_ 5 #ifndef CC_LAYER_IMPL_H_
6 #define CC_LAYER_IMPL_H_ 6 #define CC_LAYER_IMPL_H_
7 7
8 #include <public/WebFilterOperations.h> 8 #include <public/WebFilterOperations.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 void setSublayerTransform(const gfx::Transform&); 157 void setSublayerTransform(const gfx::Transform&);
158 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform ; } 158 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform ; }
159 159
160 // Debug layer name. 160 // Debug layer name.
161 void setDebugName(const std::string& debugName) { m_debugName = debugName; } 161 void setDebugName(const std::string& debugName) { m_debugName = debugName; }
162 std::string debugName() const { return m_debugName; } 162 std::string debugName() const { return m_debugName; }
163 163
164 bool showDebugBorders() const; 164 bool showDebugBorders() const;
165 165
166 // These invalidate the host's render surface layer list. The caller
167 // is responsible for calling setNeedsUpdateDrawProperties on the host
168 // so that its list can be recreated.
166 void createRenderSurface(); 169 void createRenderSurface();
167 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } 170 void clearRenderSurface() { m_drawProperties.render_surface.reset(); }
168 171
169 DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() { return m_dr awProperties; } 172 DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() { return m_dr awProperties; }
170 const DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() const { return m_drawProperties; } 173 const DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() const { return m_drawProperties; }
171 174
172 // The following are shortcut accessors to get various information from m_dr awProperties 175 // The following are shortcut accessors to get various information from m_dr awProperties
173 const gfx::Transform& drawTransform() const { return m_drawProperties.target _space_transform; } 176 const gfx::Transform& drawTransform() const { return m_drawProperties.target _space_transform; }
174 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties .screen_space_transform; } 177 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties .screen_space_transform; }
175 float drawOpacity() const { return m_drawProperties.opacity; } 178 float drawOpacity() const { return m_drawProperties.opacity; }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat a&) const; 294 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat a&) const;
292 295
293 virtual void dumpLayerProperties(std::string*, int indent) const; 296 virtual void dumpLayerProperties(std::string*, int indent) const;
294 static std::string indentString(int indent); 297 static std::string indentString(int indent);
295 298
296 private: 299 private:
297 void setParent(LayerImpl* parent) { m_parent = parent; } 300 void setParent(LayerImpl* parent) { m_parent = parent; }
298 friend class TreeSynchronizer; 301 friend class TreeSynchronizer;
299 void clearChildList(); // Warning: This does not preserve tree structure inv ariants and so is only exposed to the tree synchronizer. 302 void clearChildList(); // Warning: This does not preserve tree structure inv ariants and so is only exposed to the tree synchronizer.
300 303
304 void noteLayerSurfacePropertyChanged();
305 void noteLayerPropertyChanged();
301 void noteLayerPropertyChangedForSubtree(); 306 void noteLayerPropertyChangedForSubtree();
302 307
303 // Note carefully this does not affect the current layer. 308 // Note carefully this does not affect the current layer.
304 void noteLayerPropertyChangedForDescendants(); 309 void noteLayerPropertyChangedForDescendants();
305 310
306 virtual const char* layerTypeAsString() const; 311 virtual const char* layerTypeAsString() const;
307 312
308 void dumpLayer(std::string*, int indent) const; 313 void dumpLayer(std::string*, int indent) const;
309 314
310 // Properties internal to LayerImpl 315 // Properties internal to LayerImpl
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // Group of properties that need to be computed based on the layer tree 403 // Group of properties that need to be computed based on the layer tree
399 // hierarchy before layers can be drawn. 404 // hierarchy before layers can be drawn.
400 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; 405 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties;
401 406
402 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 407 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
403 }; 408 };
404 409
405 } 410 }
406 411
407 #endif // CC_LAYER_IMPL_H_ 412 #endif // CC_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698