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

Side by Side Diff: trunk/Source/core/rendering/compositing/CompositedLayerMapping.h

Issue 183763024: Revert 168245 "Drop background color optimization for composited..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& clip) OVERRIDE; 177 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& clip) OVERRIDE;
178 virtual bool isTrackingRepaints() const OVERRIDE; 178 virtual bool isTrackingRepaints() const OVERRIDE;
179 179
180 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; 180 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const;
181 181
182 #ifndef NDEBUG 182 #ifndef NDEBUG
183 virtual void verifyNotPainting() OVERRIDE; 183 virtual void verifyNotPainting() OVERRIDE;
184 #endif 184 #endif
185 185
186 LayoutRect contentsBox() const; 186 LayoutRect contentsBox() const;
187 IntRect backgroundBox() const;
187 188
188 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); } 189 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); }
189 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); } 190 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); }
190 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner. get(); } 191 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner. get(); }
191 192
192 void updateFilters(const RenderStyle*); 193 void updateFilters(const RenderStyle*);
193 bool canCompositeFilters() const { return m_canCompositeFilters; } 194 bool canCompositeFilters() const { return m_canCompositeFilters; }
194 195
195 void setBlendMode(blink::WebBlendMode); 196 void setBlendMode(blink::WebBlendMode);
196 197
(...skipping 18 matching lines...) Expand all
215 bool updateBackgroundLayer(bool needsBackgroundLayer); 216 bool updateBackgroundLayer(bool needsBackgroundLayer);
216 bool updateMaskLayer(bool needsMaskLayer); 217 bool updateMaskLayer(bool needsMaskLayer);
217 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); 218 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer);
218 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); } 219 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); }
219 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); } 220 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); }
220 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty(); } 221 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty(); }
221 bool updateScrollingLayers(bool scrollingLayers); 222 bool updateScrollingLayers(bool scrollingLayers);
222 void updateScrollParent(RenderLayer*); 223 void updateScrollParent(RenderLayer*);
223 void updateClipParent(RenderLayer*); 224 void updateClipParent(RenderLayer*);
224 bool updateSquashingLayers(bool needsSquashingLayers); 225 bool updateSquashingLayers(bool needsSquashingLayers);
225 void updateDrawsContent(); 226 void updateDrawsContent(bool isSimpleContainer);
226 void updateChildrenTransform(); 227 void updateChildrenTransform();
227 void registerScrollingLayers(); 228 void registerScrollingLayers();
228 229
229 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin t& delta); 230 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin t& delta);
230 231
231 void setBackgroundLayerPaintsFixedRootBackground(bool); 232 void setBackgroundLayerPaintsFixedRootBackground(bool);
232 233
233 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; 234 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
234 235
235 LayoutSize contentOffsetInCompostingLayer() const; 236 LayoutSize contentOffsetInCompostingLayer() const;
236 // Result is transform origin in pixels. 237 // Result is transform origin in pixels.
237 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const; 238 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
238 // Result is perspective origin in pixels. 239 // Result is perspective origin in pixels.
239 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const; 240 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const;
240 241
241 void updateSquashingLayerGeometry(const IntPoint& delta); 242 void updateSquashingLayerGeometry(const IntPoint& delta);
242 243
243 void updateOpacity(const RenderStyle*); 244 void updateOpacity(const RenderStyle*);
244 void updateTransform(const RenderStyle*); 245 void updateTransform(const RenderStyle*);
245 void updateLayerBlendMode(const RenderStyle*); 246 void updateLayerBlendMode(const RenderStyle*);
246 void updateIsRootForIsolatedGroup(); 247 void updateIsRootForIsolatedGroup();
247 // Return the opacity value that this layer should use for compositing. 248 // Return the opacity value that this layer should use for compositing.
248 float compositingOpacity(float rendererOpacity) const; 249 float compositingOpacity(float rendererOpacity) const;
249 250
250 bool isMainFrameRenderViewLayer() const; 251 bool isMainFrameRenderViewLayer() const;
251 252
253 bool paintsBoxDecorations() const;
252 bool paintsChildren() const; 254 bool paintsChildren() const;
253 255
256 // Returns true if this compositing layer has no visible content.
257 bool isSimpleContainerCompositingLayer() const;
254 // Returns true if this layer has content that needs to be rendered by paint ing into the backing store. 258 // Returns true if this layer has content that needs to be rendered by paint ing into the backing store.
255 bool containsPaintedContent() const; 259 bool containsPaintedContent(bool isSimpleContainer) const;
256 // Returns true if the RenderLayer just contains an image that we can compos ite directly. 260 // Returns true if the RenderLayer just contains an image that we can compos ite directly.
257 bool isDirectlyCompositedImage() const; 261 bool isDirectlyCompositedImage() const;
258 void updateImageContents(); 262 void updateImageContents();
259 263
260 Color rendererBackgroundColor() const; 264 Color rendererBackgroundColor() const;
261 void updateBackgroundColor(); 265 void updateBackgroundColor(bool isSimpleContainer);
262 void updateContentsRect(); 266 void updateContentsRect(bool isSimpleContainer);
263 267
264 void updateCompositingReasons(); 268 void updateCompositingReasons();
265 269
266 bool hasVisibleNonCompositingDescendantLayers() const; 270 bool hasVisibleNonCompositingDescendantLayers() const;
267 271
268 bool shouldClipCompositedBounds() const; 272 bool shouldClipCompositedBounds() const;
269 273
270 void paintsIntoCompositedAncestorChanged(); 274 void paintsIntoCompositedAncestorChanged();
271 275
272 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c lip); 276 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c lip);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 bool m_isMainFrameRenderViewLayer; 357 bool m_isMainFrameRenderViewLayer;
354 bool m_requiresOwnBackingStoreForIntrinsicReasons; 358 bool m_requiresOwnBackingStoreForIntrinsicReasons;
355 bool m_requiresOwnBackingStoreForAncestorReasons; 359 bool m_requiresOwnBackingStoreForAncestorReasons;
356 bool m_canCompositeFilters; 360 bool m_canCompositeFilters;
357 bool m_backgroundLayerPaintsFixedRootBackground; 361 bool m_backgroundLayerPaintsFixedRootBackground;
358 }; 362 };
359 363
360 } // namespace WebCore 364 } // namespace WebCore
361 365
362 #endif // CompositedLayerMapping_h 366 #endif // CompositedLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698