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

Unified Diff: Source/web/PageWidgetDelegate.cpp

Issue 1154783007: Use SkPictureBuilder in PageWidgetDelegate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/svg/graphics/SVGImage.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageWidgetDelegate.cpp
diff --git a/Source/web/PageWidgetDelegate.cpp b/Source/web/PageWidgetDelegate.cpp
index 44fcdc34119622d00bdee51dd0ea77c369b54cad..74437cd62d55069b697132de06d21735aada426c 100644
--- a/Source/web/PageWidgetDelegate.cpp
+++ b/Source/web/PageWidgetDelegate.cpp
@@ -42,8 +42,8 @@
#include "platform/Logging.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/paint/ClipRecorder.h"
-#include "platform/graphics/paint/DisplayItemListContextRecorder.h"
#include "platform/graphics/paint/DrawingRecorder.h"
+#include "platform/graphics/paint/SkPictureBuilder.h"
#include "platform/transforms/AffineTransform.h"
#include "public/web/WebInputEvent.h"
#include "web/PageOverlayList.h"
@@ -72,10 +72,10 @@ void PageWidgetDelegate::paint(Page& page, PageOverlayList* overlays, WebCanvas*
if (rect.isEmpty())
return;
- OwnPtr<GraphicsContext> context = GraphicsContext::deprecatedCreateWithCanvas(canvas);
+ IntRect intRect(rect);
+ SkPictureBuilder pictureBuilder(intRect);
{
- DisplayItemListContextRecorder contextRecorder(*context);
- GraphicsContext& paintContext = contextRecorder.context();
+ GraphicsContext& paintContext = pictureBuilder.context();
// FIXME: device scale factor settings are layering violations and should not
// be used within Blink paint code.
@@ -100,6 +100,7 @@ void PageWidgetDelegate::paint(Page& page, PageOverlayList* overlays, WebCanvas*
paintContext.fillRect(dirtyRect, Color::white);
}
}
+ pictureBuilder.endRecording()->playback(canvas);
}
bool PageWidgetDelegate::handleInputEvent(PageWidgetEventHandler& handler, const WebInputEvent& event, LocalFrame* root)
« no previous file with comments | « Source/core/svg/graphics/SVGImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698