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

Unified Diff: Source/web/WebDevToolsAgentImpl.cpp

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/WebDevToolsAgentImpl.cpp
diff --git a/Source/web/WebDevToolsAgentImpl.cpp b/Source/web/WebDevToolsAgentImpl.cpp
index 48b05146305236edfd7c57d2e1e258a55013a011..f3fa5c6f208337fcc7177d88850a1190a01d53d6 100644
--- a/Source/web/WebDevToolsAgentImpl.cpp
+++ b/Source/web/WebDevToolsAgentImpl.cpp
@@ -67,6 +67,7 @@
#include "public/web/WebMemoryUsageInfo.h"
#include "public/web/WebSettings.h"
#include "public/web/WebViewClient.h"
+#include "web/WebGraphicsContextImpl.h"
#include "web/WebInputEventConversion.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebViewImpl.h"
@@ -487,27 +488,10 @@ LocalFrame* WebDevToolsAgentImpl::mainFrame()
}
// WebPageOverlay
-void WebDevToolsAgentImpl::paintPageOverlay(WebCanvas* canvas)
+void WebDevToolsAgentImpl::paintPageOverlay(WebGraphicsContext* context, const WebSize& webViewSize)
{
- InspectorController* ic = inspectorController();
- if (ic) {
- OwnPtr<GraphicsContext> graphicsContext;
- OwnPtr<DisplayItemList> displayItemList;
- if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
- displayItemList = DisplayItemList::create();
- graphicsContext = adoptPtr(new GraphicsContext(nullptr, displayItemList.get()));
- } else {
- graphicsContext = adoptPtr(new GraphicsContext(canvas, nullptr));
- }
-
- graphicsContext->setCertainlyOpaque(false);
- ic->drawHighlight(*graphicsContext);
-
- if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
- GraphicsContext context(canvas, nullptr);
- displayItemList->replay(&context);
- }
- }
+ if (InspectorController* ic = inspectorController())
+ ic->drawHighlight(toWebGraphicsContextImpl(context)->graphicsContext());
}
void WebDevToolsAgentImpl::highlight()

Powered by Google App Engine
This is Rietveld 408576698