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

Unified Diff: Source/web/PageOverlay.h

Issue 867063004: [Slimming Paint] Paint the inspector overlay with GraphicsLayer DisplayList. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/web/PageOverlay.h
diff --git a/Source/web/PageOverlay.h b/Source/web/PageOverlay.h
index f55fbc1dde1a1ade0bf301cc1dd678bb90efb426..f0061139230874adfd831adf42c9a42c08cbb06f 100644
--- a/Source/web/PageOverlay.h
+++ b/Source/web/PageOverlay.h
@@ -29,18 +29,25 @@
#ifndef PageOverlay_h
#define PageOverlay_h
+#include "platform/graphics/GraphicsLayerClient.h"
+#include "platform/graphics/paint/DisplayItemClient.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
namespace blink {
class GraphicsContext;
class GraphicsLayer;
-class GraphicsLayerClient;
class WebPageOverlay;
class WebViewImpl;
-class PageOverlay {
+// Manages a layer that is overlaid on a WebView's content.
+// Clients can paint by implementing WebPageOverlay.
+//
+// With Slimming Paint, internal clients can extract a GraphicsContext to add
+// to the DisplayItemList owned by the GraphicsLayer.
+class PageOverlay : public GraphicsLayerClient {
public:
static PassOwnPtr<PageOverlay> create(WebViewImpl*, WebPageOverlay*);
@@ -57,6 +64,11 @@ public:
void paintWebFrame(GraphicsContext&);
GraphicsLayer* graphicsLayer() const { return m_layer.get(); }
+ DisplayItemClient displayItemClient() { return toDisplayItemClient(this); }
+
+ // GraphicsLayerClient implementation
+ void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) override;
+ String debugName(const GraphicsLayer*) override;
private:
PageOverlay(WebViewImpl*, WebPageOverlay*);
@@ -64,7 +76,6 @@ private:
WebViewImpl* m_viewImpl;
WebPageOverlay* m_overlay;
- OwnPtr<GraphicsLayerClient> m_layerClient;
OwnPtr<GraphicsLayer> m_layer;
int m_zOrder;
};

Powered by Google App Engine
This is Rietveld 408576698