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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h

Issue 10146014: Merge 113677 - [chromium] Viewport is not filled when out of texture memory on mac (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 void setReplicaLayer(PassOwnPtr<CCLayerImpl>); 78 void setReplicaLayer(PassOwnPtr<CCLayerImpl>);
79 CCLayerImpl* replicaLayer() const { return m_replicaLayer.get(); } 79 CCLayerImpl* replicaLayer() const { return m_replicaLayer.get(); }
80 80
81 #ifndef NDEBUG 81 #ifndef NDEBUG
82 int debugID() const { return m_debugID; } 82 int debugID() const { return m_debugID; }
83 #endif 83 #endif
84 84
85 PassOwnPtr<CCSharedQuadState> createSharedQuadState() const; 85 PassOwnPtr<CCSharedQuadState> createSharedQuadState() const;
86 virtual void willDraw(LayerRendererChromium*) { } 86 virtual void willDraw(LayerRendererChromium*) { }
87 virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& used Checkerboard); 87 virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& used Checkerboard) { }
88 virtual void didDraw() { } 88 virtual void didDraw() { }
89 void appendDebugBorderQuad(CCQuadCuller&, const CCSharedQuadState*) const; 89 void appendDebugBorderQuad(CCQuadCuller&, const CCSharedQuadState*) const;
90 90
91 void unreserveContentsTexture(); 91 void unreserveContentsTexture();
92 virtual void bindContentsTexture(LayerRendererChromium*); 92 virtual void bindContentsTexture(LayerRendererChromium*);
93 93
94 // Returns true if this layer has content to draw. 94 // Returns true if this layer has content to draw.
95 void setDrawsContent(bool); 95 void setDrawsContent(bool);
96 bool drawsContent() const { return m_drawsContent; } 96 bool drawsContent() const { return m_drawsContent; }
97 97
98 // Returns true if any of the layer's descendants has content to draw. 98 // Returns true if any of the layer's descendants has content to draw.
99 bool descendantDrawsContent(); 99 bool descendantDrawsContent();
100 100
101 void setAnchorPoint(const FloatPoint&); 101 void setAnchorPoint(const FloatPoint&);
102 const FloatPoint& anchorPoint() const { return m_anchorPoint; } 102 const FloatPoint& anchorPoint() const { return m_anchorPoint; }
103 103
104 void setAnchorPointZ(float); 104 void setAnchorPointZ(float);
105 float anchorPointZ() const { return m_anchorPointZ; } 105 float anchorPointZ() const { return m_anchorPointZ; }
106 106
107 void setBackgroundColor(const Color&); 107 void setBackgroundColor(const Color&);
108 Color backgroundColor() const { return m_backgroundColor; } 108 Color backgroundColor() const { return m_backgroundColor; }
109 109
110 void setBackgroundCoversViewport(bool);
111 bool backgroundCoversViewport() const { return m_backgroundCoversViewport; }
112
113 void setFilters(const FilterOperations&); 110 void setFilters(const FilterOperations&);
114 const FilterOperations& filters() const { return m_filters; } 111 const FilterOperations& filters() const { return m_filters; }
115 112
116 void setMasksToBounds(bool); 113 void setMasksToBounds(bool);
117 bool masksToBounds() const { return m_masksToBounds; } 114 bool masksToBounds() const { return m_masksToBounds; }
118 115
119 void setOpaque(bool); 116 void setOpaque(bool);
120 bool opaque() const { return m_opaque; } 117 bool opaque() const { return m_opaque; }
121 118
122 void setOpacity(float); 119 void setOpacity(float);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 const FloatRect& updateRect() const { return m_updateRect; } 222 const FloatRect& updateRect() const { return m_updateRect; }
226 void setUpdateRect(const FloatRect& updateRect) { m_updateRect = updateRect; } 223 void setUpdateRect(const FloatRect& updateRect) { m_updateRect = updateRect; }
227 224
228 String layerTreeAsText() const; 225 String layerTreeAsText() const;
229 226
230 bool layerPropertyChanged() const { return m_layerPropertyChanged; } 227 bool layerPropertyChanged() const { return m_layerPropertyChanged; }
231 void resetAllChangeTrackingForSubtree(); 228 void resetAllChangeTrackingForSubtree();
232 229
233 CCLayerAnimationController* layerAnimationController() { return m_layerAnima tionController.get(); } 230 CCLayerAnimationController* layerAnimationController() { return m_layerAnima tionController.get(); }
234 231
235 virtual Region visibleContentOpaqueRegion() const { return Region(); }; 232 virtual Region visibleContentOpaqueRegion() const;
236 233
237 // Indicates that the context previously used to render this layer 234 // Indicates that the context previously used to render this layer
238 // was lost and that a new one has been created. Won't be called 235 // was lost and that a new one has been created. Won't be called
239 // until the new context has been created successfully. 236 // until the new context has been created successfully.
240 virtual void didLoseContext(); 237 virtual void didLoseContext();
241 238
242 protected: 239 protected:
243 explicit CCLayerImpl(int); 240 explicit CCLayerImpl(int);
244 241
245 virtual void dumpLayerProperties(TextStream&, int indent) const; 242 virtual void dumpLayerProperties(TextStream&, int indent) const;
246 static void writeIndent(TextStream&, int indent); 243 static void writeIndent(TextStream&, int indent);
247 244
248 // Transformation used to transform quads provided in appendQuads. 245 // Transformation used to transform quads provided in appendQuads.
249 virtual TransformationMatrix quadTransform() const; 246 virtual TransformationMatrix quadTransform() const;
250 247
251 void appendGutterQuads(CCQuadCuller&, const CCSharedQuadState*);
252
253 private: 248 private:
254 void setParent(CCLayerImpl* parent) { m_parent = parent; } 249 void setParent(CCLayerImpl* parent) { m_parent = parent; }
255 friend class TreeSynchronizer; 250 friend class TreeSynchronizer;
256 void clearChildList(); // Warning: This does not preserve tree structure inv ariants and so is only exposed to the tree synchronizer. 251 void clearChildList(); // Warning: This does not preserve tree structure inv ariants and so is only exposed to the tree synchronizer.
257 252
258 void noteLayerPropertyChangedForSubtree(); 253 void noteLayerPropertyChangedForSubtree();
259 254
260 // Note carefully this does not affect the current layer. 255 // Note carefully this does not affect the current layer.
261 void noteLayerPropertyChangedForDescendants(); 256 void noteLayerPropertyChangedForDescendants();
262 257
(...skipping 15 matching lines...) Expand all
278 FloatPoint m_anchorPoint; 273 FloatPoint m_anchorPoint;
279 float m_anchorPointZ; 274 float m_anchorPointZ;
280 IntSize m_bounds; 275 IntSize m_bounds;
281 IntSize m_contentBounds; 276 IntSize m_contentBounds;
282 IntPoint m_scrollPosition; 277 IntPoint m_scrollPosition;
283 bool m_scrollable; 278 bool m_scrollable;
284 bool m_shouldScrollOnMainThread; 279 bool m_shouldScrollOnMainThread;
285 bool m_haveWheelEventHandlers; 280 bool m_haveWheelEventHandlers;
286 Region m_nonFastScrollableRegion; 281 Region m_nonFastScrollableRegion;
287 Color m_backgroundColor; 282 Color m_backgroundColor;
288 bool m_backgroundCoversViewport;
289 283
290 // Whether the "back" of this layer should draw. 284 // Whether the "back" of this layer should draw.
291 bool m_doubleSided; 285 bool m_doubleSided;
292 286
293 // Tracks if drawing-related properties have changed since last redraw. 287 // Tracks if drawing-related properties have changed since last redraw.
294 bool m_layerPropertyChanged; 288 bool m_layerPropertyChanged;
295 289
296 IntRect m_visibleLayerRect; 290 IntRect m_visibleLayerRect;
297 bool m_masksToBounds; 291 bool m_masksToBounds;
298 bool m_opaque; 292 bool m_opaque;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 355
362 // Manages animations for this layer. 356 // Manages animations for this layer.
363 OwnPtr<CCLayerAnimationController> m_layerAnimationController; 357 OwnPtr<CCLayerAnimationController> m_layerAnimationController;
364 }; 358 };
365 359
366 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter ator end, CCLayerSorter*); 360 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter ator end, CCLayerSorter*);
367 361
368 } 362 }
369 363
370 #endif // CCLayerImpl_h 364 #endif // CCLayerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698