diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-14 11:38:45 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-14 17:16:47 +0000 |
commit | 3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 (patch) | |
tree | 43cc572ba067417c7341db81f71ae7cc6e0fcc3e /chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp | |
parent | f61ab1ac7f855cd281809255c0aedbb1895e1823 (diff) |
BASELINE: Update chromium to 45.0.2454.40
Change-Id: Id2121d9f11a8fc633677236c65a3e41feef589e4
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp b/chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp index 1dcf0f1e917..a0723ebf497 100644 --- a/chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp +++ b/chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp @@ -33,17 +33,17 @@ #include "core/frame/FrameView.h" #include "core/frame/LocalFrame.h" +#include "core/input/EventHandler.h" #include "core/layout/LayoutView.h" #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" #include "core/page/AutoscrollController.h" -#include "core/page/EventHandler.h" #include "core/page/Page.h" #include "core/paint/TransformRecorder.h" #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. @@ -94,12 +94,12 @@ void PageWidgetDelegate::paint(Page& page, PageOverlayList* overlays, WebCanvas* view->paint(&paintContext, dirtyRect); if (overlays) overlays->paintWebFrame(paintContext); - } else { + } else if (!DrawingRecorder::useCachedDrawingIfPossible(paintContext, root, DisplayItem::PageWidgetDelegateBackgroundFallback)) { DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::PageWidgetDelegateBackgroundFallback, dirtyRect); - if (!drawingRecorder.canUseCachedDrawing()) - paintContext.fillRect(dirtyRect, Color::white); + paintContext.fillRect(dirtyRect, Color::white); } } + pictureBuilder.endRecording()->playback(canvas); } bool PageWidgetDelegate::handleInputEvent(PageWidgetEventHandler& handler, const WebInputEvent& event, LocalFrame* root) |