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

Unified Diff: Source/web/PageOverlayList.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/PageOverlayList.h
diff --git a/Source/web/PageOverlayList.h b/Source/web/PageOverlayList.h
index 779a7db74d9a4d4bf90b5b475a07e656f639c1db..33822df83825a9814fbed647b17b1f390223890e 100644
--- a/Source/web/PageOverlayList.h
+++ b/Source/web/PageOverlayList.h
@@ -29,6 +29,7 @@
#ifndef PageOverlayList_h
#define PageOverlayList_h
+#include "web/PageOverlay.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
@@ -51,14 +52,21 @@ public:
// Adds/removes a PageOverlay for given client.
// Returns true if a PageOverlay is added/removed.
- bool add(WebPageOverlay*, int /* zOrder */);
+ bool add(WebPageOverlay*, int zOrder);
+ bool add(PageOverlay::Painter*, int zOrder);
bool remove(WebPageOverlay*);
+ bool remove(PageOverlay::Painter*);
void update();
void paintWebFrame(GraphicsContext&);
size_t findGraphicsLayer(GraphicsLayer*);
+ // FIXME: Really, it should be possible for there to be multiple.
+ // But the signature of WebViewImpl::setOverlayLayer already seems to
+ // preclude that.
+ GraphicsLayer* graphicsLayerForTesting() const;
+
private:
typedef Vector<OwnPtr<PageOverlay>, 2> PageOverlays;
@@ -66,6 +74,14 @@ private:
// Returns the index of the client found. Otherwise, returns WTF::kNotFound.
size_t find(WebPageOverlay*);
+ size_t find(PageOverlay::Painter*);
+
+ // Finds the overlay with the given client, adding it if it does not exist.
+ template <typename T>
+ size_t findOrAdd(T* client, bool& added);
+
+ // Adjusts overlay order to match z-order and issue any necessary updates.
+ void updateForZOrder(size_t indexOfChangedOverlay);
WebViewImpl* m_viewImpl;
PageOverlays m_pageOverlays;

Powered by Google App Engine
This is Rietveld 408576698