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

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

Issue 178013003: Drop background color optimization for composited layers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to upstream 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
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& clip) OVERRIDE; 184 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& clip) OVERRIDE;
185 virtual bool isTrackingRepaints() const OVERRIDE; 185 virtual bool isTrackingRepaints() const OVERRIDE;
186 186
187 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; 187 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const;
188 188
189 #ifndef NDEBUG 189 #ifndef NDEBUG
190 virtual void verifyNotPainting() OVERRIDE; 190 virtual void verifyNotPainting() OVERRIDE;
191 #endif 191 #endif
192 192
193 LayoutRect contentsBox() const; 193 LayoutRect contentsBox() const;
194 IntRect backgroundBox() const;
195 194
196 // For informative purposes only. 195 // For informative purposes only.
197 CompositingLayerType compositingLayerType() const; 196 CompositingLayerType compositingLayerType() const;
198 197
199 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); } 198 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); }
200 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); } 199 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); }
201 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner. get(); } 200 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner. get(); }
202 201
203 void updateFilters(const RenderStyle*); 202 void updateFilters(const RenderStyle*);
204 bool canCompositeFilters() const { return m_canCompositeFilters; } 203 bool canCompositeFilters() const { return m_canCompositeFilters; }
(...skipping 21 matching lines...) Expand all
226 bool updateBackgroundLayer(bool needsBackgroundLayer); 225 bool updateBackgroundLayer(bool needsBackgroundLayer);
227 bool updateMaskLayer(bool needsMaskLayer); 226 bool updateMaskLayer(bool needsMaskLayer);
228 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); 227 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer);
229 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); } 228 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); }
230 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); } 229 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); }
231 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty(); } 230 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty(); }
232 bool updateScrollingLayers(bool scrollingLayers); 231 bool updateScrollingLayers(bool scrollingLayers);
233 void updateScrollParent(RenderLayer*); 232 void updateScrollParent(RenderLayer*);
234 void updateClipParent(RenderLayer*); 233 void updateClipParent(RenderLayer*);
235 bool updateSquashingLayers(bool needsSquashingLayers); 234 bool updateSquashingLayers(bool needsSquashingLayers);
236 void updateDrawsContent(bool isSimpleContainer); 235 void updateDrawsContent();
237 void updateChildrenTransform(); 236 void updateChildrenTransform();
238 void registerScrollingLayers(); 237 void registerScrollingLayers();
239 238
240 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin t& delta); 239 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin t& delta);
241 240
242 void setBackgroundLayerPaintsFixedRootBackground(bool); 241 void setBackgroundLayerPaintsFixedRootBackground(bool);
243 242
244 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; 243 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
245 244
246 LayoutSize contentOffsetInCompostingLayer() const; 245 LayoutSize contentOffsetInCompostingLayer() const;
247 // Result is transform origin in pixels. 246 // Result is transform origin in pixels.
248 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const; 247 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
249 // Result is perspective origin in pixels. 248 // Result is perspective origin in pixels.
250 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const; 249 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const;
251 250
252 void updateSquashingLayerGeometry(const IntPoint& delta); 251 void updateSquashingLayerGeometry(const IntPoint& delta);
253 252
254 void updateOpacity(const RenderStyle*); 253 void updateOpacity(const RenderStyle*);
255 void updateTransform(const RenderStyle*); 254 void updateTransform(const RenderStyle*);
256 void updateLayerBlendMode(const RenderStyle*); 255 void updateLayerBlendMode(const RenderStyle*);
257 void updateIsRootForIsolatedGroup(); 256 void updateIsRootForIsolatedGroup();
258 // Return the opacity value that this layer should use for compositing. 257 // Return the opacity value that this layer should use for compositing.
259 float compositingOpacity(float rendererOpacity) const; 258 float compositingOpacity(float rendererOpacity) const;
260 259
261 bool isMainFrameRenderViewLayer() const; 260 bool isMainFrameRenderViewLayer() const;
262 261
263 bool paintsBoxDecorations() const;
264 bool paintsChildren() const; 262 bool paintsChildren() const;
265 263
266 // Returns true if this compositing layer has no visible content.
267 bool isSimpleContainerCompositingLayer() const;
268 // Returns true if this layer has content that needs to be rendered by paint ing into the backing store. 264 // Returns true if this layer has content that needs to be rendered by paint ing into the backing store.
269 bool containsPaintedContent(bool isSimpleContainer) const; 265 bool containsPaintedContent() const;
266 // Returns true if this layer has content that needs to be rendered by its o wn reasons such as box decoration, non-composited visible children, and etc..
alokp 2014/02/27 19:22:27 The comment is still not clear to me. How is it di
dshwang 2014/02/27 19:50:53 How about hasVisibleContentOrNonCompositingDescend
267 bool paintsIntoOwningLayer() const;
270 // Returns true if the RenderLayer just contains an image that we can compos ite directly. 268 // Returns true if the RenderLayer just contains an image that we can compos ite directly.
271 bool isDirectlyCompositedImage() const; 269 bool isDirectlyCompositedImage() const;
272 void updateImageContents(); 270 void updateImageContents();
273 271
274 Color rendererBackgroundColor() const; 272 Color rendererBackgroundColor() const;
275 void updateBackgroundColor(bool isSimpleContainer); 273 void updateBackgroundColor();
276 void updateContentsRect(bool isSimpleContainer); 274 void updateContentsRect();
277 275
278 void updateCompositingReasons(); 276 void updateCompositingReasons();
279 277
280 bool hasVisibleNonCompositingDescendantLayers() const; 278 bool hasVisibleNonCompositingDescendantLayers() const;
281 279
282 bool shouldClipCompositedBounds() const; 280 bool shouldClipCompositedBounds() const;
283 281
284 void paintsIntoCompositedAncestorChanged(); 282 void paintsIntoCompositedAncestorChanged();
285 283
286 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c lip); 284 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c lip);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 bool m_isMainFrameRenderViewLayer; 365 bool m_isMainFrameRenderViewLayer;
368 bool m_requiresOwnBackingStoreForIntrinsicReasons; 366 bool m_requiresOwnBackingStoreForIntrinsicReasons;
369 bool m_requiresOwnBackingStoreForAncestorReasons; 367 bool m_requiresOwnBackingStoreForAncestorReasons;
370 bool m_canCompositeFilters; 368 bool m_canCompositeFilters;
371 bool m_backgroundLayerPaintsFixedRootBackground; 369 bool m_backgroundLayerPaintsFixedRootBackground;
372 }; 370 };
373 371
374 } // namespace WebCore 372 } // namespace WebCore
375 373
376 #endif // CompositedLayerMapping_h 374 #endif // CompositedLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698