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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.h

Issue 1401363003: Rename DisplayItemList to PaintController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 22 matching lines...) Expand all
33 #include "platform/geometry/FloatSize.h" 33 #include "platform/geometry/FloatSize.h"
34 #include "platform/geometry/IntRect.h" 34 #include "platform/geometry/IntRect.h"
35 #include "platform/graphics/Color.h" 35 #include "platform/graphics/Color.h"
36 #include "platform/graphics/ContentLayerDelegate.h" 36 #include "platform/graphics/ContentLayerDelegate.h"
37 #include "platform/graphics/GraphicsLayerClient.h" 37 #include "platform/graphics/GraphicsLayerClient.h"
38 #include "platform/graphics/GraphicsLayerDebugInfo.h" 38 #include "platform/graphics/GraphicsLayerDebugInfo.h"
39 #include "platform/graphics/ImageOrientation.h" 39 #include "platform/graphics/ImageOrientation.h"
40 #include "platform/graphics/PaintInvalidationReason.h" 40 #include "platform/graphics/PaintInvalidationReason.h"
41 #include "platform/graphics/filters/FilterOperations.h" 41 #include "platform/graphics/filters/FilterOperations.h"
42 #include "platform/graphics/paint/DisplayItemClient.h" 42 #include "platform/graphics/paint/DisplayItemClient.h"
43 #include "platform/graphics/paint/DisplayItemList.h" 43 #include "platform/graphics/paint/PaintController.h"
44 #include "platform/transforms/TransformationMatrix.h" 44 #include "platform/transforms/TransformationMatrix.h"
45 #include "public/platform/WebCompositorAnimationDelegate.h" 45 #include "public/platform/WebCompositorAnimationDelegate.h"
46 #include "public/platform/WebContentLayer.h" 46 #include "public/platform/WebContentLayer.h"
47 #include "public/platform/WebImageLayer.h" 47 #include "public/platform/WebImageLayer.h"
48 #include "public/platform/WebLayerClient.h" 48 #include "public/platform/WebLayerClient.h"
49 #include "public/platform/WebLayerScrollClient.h" 49 #include "public/platform/WebLayerScrollClient.h"
50 #include "public/platform/WebScrollBlocksOn.h" 50 #include "public/platform/WebScrollBlocksOn.h"
51 #include "third_party/skia/include/core/SkPaint.h" 51 #include "third_party/skia/include/core/SkPaint.h"
52 #include "wtf/OwnPtr.h" 52 #include "wtf/OwnPtr.h"
53 #include "wtf/PassOwnPtr.h" 53 #include "wtf/PassOwnPtr.h"
54 #include "wtf/Vector.h" 54 #include "wtf/Vector.h"
55 55
56 namespace blink { 56 namespace blink {
57 57
58 class DisplayItemList;
59 class FloatRect; 58 class FloatRect;
60 class GraphicsContext; 59 class GraphicsContext;
61 class GraphicsLayer; 60 class GraphicsLayer;
62 class GraphicsLayerFactory; 61 class GraphicsLayerFactory;
63 class GraphicsLayerFactoryChromium; 62 class GraphicsLayerFactoryChromium;
64 class Image; 63 class Image;
65 class LinkHighlight; 64 class LinkHighlight;
66 class JSONObject; 65 class JSONObject;
66 class PaintController;
67 class ScrollableArea; 67 class ScrollableArea;
68 class WebCompositorAnimation; 68 class WebCompositorAnimation;
69 class WebLayer; 69 class WebLayer;
70 70
71 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; 71 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector;
72 72
73 // GraphicsLayer is an abstraction for a rendering surface with backing store, 73 // GraphicsLayer is an abstraction for a rendering surface with backing store,
74 // which may have associated transformation and animations. 74 // which may have associated transformation and animations.
75 75
76 class PLATFORM_EXPORT GraphicsLayer : public GraphicsContextPainter, public WebC ompositorAnimationDelegate, public WebLayerScrollClient, public WebLayerClient { 76 class PLATFORM_EXPORT GraphicsLayer : public GraphicsContextPainter, public WebC ompositorAnimationDelegate, public WebLayerScrollClient, public WebLayerClient {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 void paint(GraphicsContext&, const IntRect& clip) override; 248 void paint(GraphicsContext&, const IntRect& clip) override;
249 void paintIfNeeded(GraphicsContext&) override; 249 void paintIfNeeded(GraphicsContext&) override;
250 250
251 // WebCompositorAnimationDelegate implementation. 251 // WebCompositorAnimationDelegate implementation.
252 void notifyAnimationStarted(double monotonicTime, int group) override; 252 void notifyAnimationStarted(double monotonicTime, int group) override;
253 void notifyAnimationFinished(double monotonicTime, int group) override; 253 void notifyAnimationFinished(double monotonicTime, int group) override;
254 254
255 // WebLayerScrollClient implementation. 255 // WebLayerScrollClient implementation.
256 void didScroll() override; 256 void didScroll() override;
257 257
258 DisplayItemList* displayItemList() override; 258 PaintController* paintController() override;
259 259
260 // Exposed for tests. 260 // Exposed for tests.
261 virtual WebLayer* contentsLayer() const { return m_contentsLayer; } 261 virtual WebLayer* contentsLayer() const { return m_contentsLayer; }
262 262
263 static void setDrawDebugRedFillForTesting(bool); 263 static void setDrawDebugRedFillForTesting(bool);
264 ContentLayerDelegate* contentLayerDelegateForTesting() const { return m_cont entLayerDelegate.get(); } 264 ContentLayerDelegate* contentLayerDelegateForTesting() const { return m_cont entLayerDelegate.get(); }
265 265
266 #ifndef NDEBUG 266 #ifndef NDEBUG
267 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 267 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
268 String debugName() const { return m_client->debugName(this) + " debug red fi ll"; } 268 String debugName() const { return m_client->debugName(this) + " debug red fi ll"; }
269 #endif 269 #endif
270 270
271 protected: 271 protected:
272 String debugName(WebLayer*) const; 272 String debugName(WebLayer*) const;
273 273
274 explicit GraphicsLayer(GraphicsLayerClient*); 274 explicit GraphicsLayer(GraphicsLayerClient*);
275 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends. 275 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends.
276 friend class GraphicsLayerFactoryChromium; 276 friend class GraphicsLayerFactoryChromium;
277 // for testing 277 // for testing
278 friend class FakeGraphicsLayerFactory; 278 friend class FakeGraphicsLayerFactory;
279 279
280 private: 280 private:
281 // Sets m_needsDisplay, but without invalidating the DisplayItemList. This a llows us to test 281 // Sets m_needsDisplay, but without invalidating the PaintController. This a llows us to test
282 // scenarios where paint needs to be re-calculated, but no DisplayItemClient s were invalidated 282 // scenarios where paint needs to be re-calculated, but no DisplayItemClient s were invalidated
283 // (such as re-paints due to change of interest rect). 283 // (such as re-paints due to change of interest rect).
284 void setNeedsDisplayWithoutInvalidateForTesting(); 284 void setNeedsDisplayWithoutInvalidateForTesting();
285 285
286 // Adds a child without calling updateChildList(), so that adding children 286 // Adds a child without calling updateChildList(), so that adding children
287 // can be batched before updating. 287 // can be batched before updating.
288 void addChildInternal(GraphicsLayer*); 288 void addChildInternal(GraphicsLayer*);
289 289
290 #if ENABLE(ASSERT) 290 #if ENABLE(ASSERT)
291 bool hasAncestor(GraphicsLayer*) const; 291 bool hasAncestor(GraphicsLayer*) const;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 int m_contentsLayerId; 368 int m_contentsLayerId;
369 369
370 Vector<LinkHighlight*> m_linkHighlights; 370 Vector<LinkHighlight*> m_linkHighlights;
371 371
372 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; 372 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate;
373 373
374 ScrollableArea* m_scrollableArea; 374 ScrollableArea* m_scrollableArea;
375 GraphicsLayerDebugInfo m_debugInfo; 375 GraphicsLayerDebugInfo m_debugInfo;
376 int m_3dRenderingContext; 376 int m_3dRenderingContext;
377 377
378 OwnPtr<DisplayItemList> m_displayItemList; 378 OwnPtr<PaintController> m_paintController;
379 379
380 friend class DisplayItemListPaintTestForSlimmingPaintV2; 380 friend class PaintControllerPaintTestForSlimmingPaintV2;
381 }; 381 };
382 382
383 } // namespace blink 383 } // namespace blink
384 384
385 #ifndef NDEBUG 385 #ifndef NDEBUG
386 // Outside the blink namespace for ease of invocation from gdb. 386 // Outside the blink namespace for ease of invocation from gdb.
387 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); 387 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*);
388 #endif 388 #endif
389 389
390 #endif // GraphicsLayer_h 390 #endif // GraphicsLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698