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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h

Issue 1441973003: Use recomputed interest rect only if it changed enough (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix release builds Created 5 years, 1 month 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 String layerTreeAsText(LayerTreeFlags); 146 String layerTreeAsText(LayerTreeFlags);
147 147
148 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); } 148 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); }
149 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); } 149 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); }
150 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner. get(); } 150 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner. get(); }
151 151
152 void resetTrackedPaintInvalidationRects(); 152 void resetTrackedPaintInvalidationRects();
153 void setTracksPaintInvalidations(bool); 153 void setTracksPaintInvalidations(bool);
154 154
155 String debugName(const GraphicsLayer*) override; 155 String debugName(const GraphicsLayer*) const override;
156 DocumentLifecycle& lifecycle() const; 156 DocumentLifecycle& lifecycle() const;
157 157
158 bool needsUpdateDescendantDependentFlags() const { return m_needsUpdateDesce ndantDependentFlags; } 158 bool needsUpdateDescendantDependentFlags() const { return m_needsUpdateDesce ndantDependentFlags; }
159 void setNeedsUpdateDescendantDependentFlags() { m_needsUpdateDescendantDepen dentFlags = true; } 159 void setNeedsUpdateDescendantDependentFlags() { m_needsUpdateDescendantDepen dentFlags = true; }
160 160
161 void updatePotentialCompositingReasonsFromStyle(PaintLayer*); 161 void updatePotentialCompositingReasonsFromStyle(PaintLayer*);
162 162
163 // Whether the layer could ever be composited. 163 // Whether the layer could ever be composited.
164 bool canBeComposited(const PaintLayer*) const; 164 bool canBeComposited(const PaintLayer*) const;
165 165
166 // FIXME: Move allocateOrClearCompositedLayerMapping to CompositingLayerAssi gner once we've fixed 166 // FIXME: Move allocateOrClearCompositedLayerMapping to CompositingLayerAssi gner once we've fixed
167 // the compositing chicken/egg issues. 167 // the compositing chicken/egg issues.
168 bool allocateOrClearCompositedLayerMapping(PaintLayer*, CompositingStateTran sitionType compositedLayerUpdate); 168 bool allocateOrClearCompositedLayerMapping(PaintLayer*, CompositingStateTran sitionType compositedLayerUpdate);
169 169
170 void updateDirectCompositingReasons(PaintLayer*); 170 void updateDirectCompositingReasons(PaintLayer*);
171 171
172 bool inOverlayFullscreenVideo() const { return m_inOverlayFullscreenVideo; } 172 bool inOverlayFullscreenVideo() const { return m_inOverlayFullscreenVideo; }
173 173
174 private: 174 private:
175 #if ENABLE(ASSERT) 175 #if ENABLE(ASSERT)
176 void assertNoUnresolvedDirtyBits(); 176 void assertNoUnresolvedDirtyBits();
177 #endif 177 #endif
178 178
179 // GraphicsLayerClient implementation 179 // GraphicsLayerClient implementation
180 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect*) const override; 180 IntRect computeInterestRect(const GraphicsLayer*, const IntRect&) const over ride;
181 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect& interestRect) const override;
181 182
182 bool isTrackingPaintInvalidations() const override; 183 bool isTrackingPaintInvalidations() const override;
183 184
184 void updateWithoutAcceleratedCompositing(CompositingUpdateType); 185 void updateWithoutAcceleratedCompositing(CompositingUpdateType);
185 void updateIfNeeded(); 186 void updateIfNeeded();
186 187
187 void ensureRootLayer(); 188 void ensureRootLayer();
188 void destroyRootLayer(); 189 void destroyRootLayer();
189 190
190 void attachRootLayer(RootLayerAttachment); 191 void attachRootLayer(RootLayerAttachment);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 244
244 // Layers for overflow controls 245 // Layers for overflow controls
245 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; 246 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar;
246 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; 247 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar;
247 OwnPtr<GraphicsLayer> m_layerForScrollCorner; 248 OwnPtr<GraphicsLayer> m_layerForScrollCorner;
248 }; 249 };
249 250
250 } // namespace blink 251 } // namespace blink
251 252
252 #endif // PaintLayerCompositor_h 253 #endif // PaintLayerCompositor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698