summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomhudson <tomhudson@google.com>2015-11-30 09:36:51 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-30 17:37:27 +0000
commit31521a8fe53dda37a9a838402693b4d2060ec432 (patch)
tree79459a5d0657b62294dca204c877082e10f583ce
parent7bd67e23e178d871212183270fb1c577025e296d (diff)
downloadchromium_src-31521a8fe53dda37a9a838402693b4d2060ec432.zip
chromium_src-31521a8fe53dda37a9a838402693b4d2060ec432.tar.gz
chromium_src-31521a8fe53dda37a9a838402693b4d2060ec432.tar.bz2
The API of the metadata helpers doesn't depend on PlatformDevice.
Neither do the typedefs moved to the new platform_surface.h. Some #includes of platform_device.h were already unnecessary. All changes outside skia/ext/ should be purely mechanical renamings or trimming of include lists. R=fmalita@chromium.org TBR=thestig@chromium.org,danakj@chromium.org,piman@chromium.org BUG=543755 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1462163002 Cr-Commit-Position: refs/heads/master@{#362151}
-rw-r--r--components/printing/renderer/print_web_view_helper_mac.mm2
-rw-r--r--content/browser/compositor/software_output_device_mus.cc3
-rw-r--r--content/plugin/webplugin_delegate_stub.cc1
-rw-r--r--content/plugin/webplugin_proxy.cc1
-rw-r--r--content/public/browser/render_widget_host.h8
-rw-r--r--content/renderer/pepper/ppb_image_data_impl.cc1
-rw-r--r--printing/metafile_skia_wrapper.cc8
-rw-r--r--printing/printed_document.cc1
-rw-r--r--skia/ext/platform_canvas.cc51
-rw-r--r--skia/ext/platform_canvas.h17
-rw-r--r--skia/ext/platform_device.cc40
-rw-r--r--skia/ext/platform_device.h38
-rw-r--r--skia/ext/platform_device_mac.cc12
-rw-r--r--skia/ext/platform_device_win.cc1
-rw-r--r--skia/ext/platform_surface.h39
-rw-r--r--skia/ext/skia_utils_mac.mm4
-rw-r--r--third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp4
-rw-r--r--third_party/WebKit/Source/web/WebLocalFrameImpl.cpp6
-rw-r--r--ui/gfx/canvas_paint_mac.mm2
19 files changed, 124 insertions, 115 deletions
diff --git a/components/printing/renderer/print_web_view_helper_mac.mm b/components/printing/renderer/print_web_view_helper_mac.mm
index 744ddab..293f567 100644
--- a/components/printing/renderer/print_web_view_helper_mac.mm
+++ b/components/printing/renderer/print_web_view_helper_mac.mm
@@ -12,7 +12,7 @@
#include "components/printing/common/print_messages.h"
#include "printing/metafile_skia_wrapper.h"
#include "printing/page_size_margins.h"
-#include "skia/ext/platform_device.h"
+#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebCanvas.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
diff --git a/content/browser/compositor/software_output_device_mus.cc b/content/browser/compositor/software_output_device_mus.cc
index 6180114..c8c8505 100644
--- a/content/browser/compositor/software_output_device_mus.cc
+++ b/content/browser/compositor/software_output_device_mus.cc
@@ -5,8 +5,7 @@
#include "content/browser/compositor/software_output_device_mus.h"
#include "components/bitmap_uploader/bitmap_uploader.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkDevice.h"
+#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/base/view_prop.h"
#include "ui/compositor/compositor.h"
#include "ui/gfx/skia_util.h"
diff --git a/content/plugin/webplugin_delegate_stub.cc b/content/plugin/webplugin_delegate_stub.cc
index 8d4587d..b7fdf0b 100644
--- a/content/plugin/webplugin_delegate_stub.cc
+++ b/content/plugin/webplugin_delegate_stub.cc
@@ -20,7 +20,6 @@
#include "content/public/common/content_client.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
-#include "skia/ext/platform_device.h"
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/WebKit/public/web/WebBindings.h"
#include "third_party/npapi/bindings/npapi.h"
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 22e1890..5bd3d67 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -17,7 +17,6 @@
#include "content/plugin/plugin_thread.h"
#include "content/public/common/content_client.h"
#include "skia/ext/platform_canvas.h"
-#include "skia/ext/platform_device.h"
#include "third_party/WebKit/public/web/WebBindings.h"
#include "ui/gfx/canvas.h"
#include "url/url_constants.h"
diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h
index 2fda607..be57cfa 100644
--- a/content/public/browser/render_widget_host.h
+++ b/content/public/browser/render_widget_host.h
@@ -13,16 +13,10 @@
#include "ipc/ipc_sender.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/WebKit/public/web/WebTextDirection.h"
-#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/gfx/geometry/size.h"
#include "ui/surface/transport_dib.h"
-#if defined(OS_MACOSX)
-#include "skia/ext/platform_device.h"
-#endif
-
-class SkBitmap;
-
namespace gfx {
class Rect;
}
diff --git a/content/renderer/pepper/ppb_image_data_impl.cc b/content/renderer/pepper/ppb_image_data_impl.cc
index 385ca22..a7c5f0a 100644
--- a/content/renderer/pepper/ppb_image_data_impl.cc
+++ b/content/renderer/pepper/ppb_image_data_impl.cc
@@ -19,6 +19,7 @@
#include "ppapi/thunk/thunk.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkColorPriv.h"
+#include "third_party/skia/include/core/SkDevice.h"
#include "third_party/skia/include/core/SkPixmap.h"
#include "ui/surface/transport_dib.h"
diff --git a/printing/metafile_skia_wrapper.cc b/printing/metafile_skia_wrapper.cc
index 9df35ef..9f728b5 100644
--- a/printing/metafile_skia_wrapper.cc
+++ b/printing/metafile_skia_wrapper.cc
@@ -3,12 +3,10 @@
// found in the LICENSE file.
#include "printing/metafile_skia_wrapper.h"
-#include "skia/ext/platform_device.h"
+#include "skia/ext/platform_canvas.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkMetaData.h"
-class SkCanvas;
-
namespace printing {
namespace {
@@ -24,14 +22,14 @@ void MetafileSkiaWrapper::SetMetafileOnCanvas(const SkCanvas& canvas,
if (metafile)
wrapper = skia::AdoptRef(new MetafileSkiaWrapper(metafile));
- SkMetaData& meta = skia::getMetaData(canvas);
+ SkMetaData& meta = skia::GetMetaData(canvas);
meta.setRefCnt(kMetafileKey, wrapper.get());
}
// static
PdfMetafileSkia* MetafileSkiaWrapper::GetMetafileFromCanvas(
const SkCanvas& canvas) {
- SkMetaData& meta = skia::getMetaData(canvas);
+ SkMetaData& meta = skia::GetMetaData(canvas);
SkRefCnt* value;
if (!meta.findRefCnt(kMetafileKey, &value) || !value)
return NULL;
diff --git a/printing/printed_document.cc b/printing/printed_document.cc
index 3b17eff..c231bef 100644
--- a/printing/printed_document.cc
+++ b/printing/printed_document.cc
@@ -29,7 +29,6 @@
#include "printing/printed_page.h"
#include "printing/printed_pages_source.h"
#include "printing/units.h"
-#include "skia/ext/platform_device.h"
#include "ui/gfx/font.h"
#include "ui/gfx/text_elider.h"
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
index cf362b3..0df6496 100644
--- a/skia/ext/platform_canvas.cc
+++ b/skia/ext/platform_canvas.cc
@@ -4,9 +4,33 @@
#include "skia/ext/platform_canvas.h"
+#include "base/logging.h"
#include "skia/ext/bitmap_platform_device.h"
+#include "skia/ext/platform_device.h"
+#include "third_party/skia/include/core/SkMetaData.h"
#include "third_party/skia/include/core/SkTypes.h"
+namespace {
+
+#if defined(OS_MACOSX)
+const char kIsPreviewMetafileKey[] = "CrIsPreviewMetafile";
+#endif
+
+void SetBoolMetaData(const SkCanvas& canvas, const char* key, bool value) {
+ SkMetaData& meta = skia::GetMetaData(canvas);
+ meta.setBool(key, value);
+}
+
+bool GetBoolMetaData(const SkCanvas& canvas, const char* key) {
+ bool value;
+ SkMetaData& meta = skia::GetMetaData(canvas);
+ if (!meta.findBool(key, &value))
+ value = false;
+ return value;
+}
+
+} // namespace
+
namespace skia {
SkBaseDevice* GetTopDevice(const SkCanvas& canvas) {
@@ -77,9 +101,34 @@ SkCanvas* CreateCanvas(const skia::RefPtr<SkBaseDevice>& device, OnFailureType f
if (!device) {
if (CRASH_ON_FAILURE == failureType)
SK_CRASH();
- return NULL;
+ return nullptr;
}
return new SkCanvas(device.get());
}
+SkMetaData& GetMetaData(const SkCanvas& canvas) {
+ SkBaseDevice* device = canvas.getDevice();
+ DCHECK(device != nullptr);
+ return device->getMetaData();
+}
+
+#if defined(OS_MACOSX)
+void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview) {
+ SetBoolMetaData(canvas, kIsPreviewMetafileKey, is_preview);
+}
+
+bool IsPreviewMetafile(const SkCanvas& canvas) {
+ return GetBoolMetaData(canvas, kIsPreviewMetafileKey);
+}
+
+CGContextRef GetBitmapContext(const SkCanvas& canvas) {
+ SkBaseDevice* device = GetTopDevice(canvas);
+ PlatformDevice* platform_device = GetPlatformDevice(device);
+ return platform_device ? platform_device->GetBitmapContext() :
+ nullptr;
+}
+
+#endif
+
+
} // namespace skia
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h
index c46d6c4..61f5a87 100644
--- a/skia/ext/platform_canvas.h
+++ b/skia/ext/platform_canvas.h
@@ -8,13 +8,15 @@
// The platform-specific device will include the necessary platform headers
// to get the surface type.
#include "base/basictypes.h"
-#include "skia/ext/platform_device.h"
+#include "skia/ext/platform_surface.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "third_party/skia/include/core/SkPixmap.h"
+class SkBaseDevice;
+
namespace skia {
typedef SkCanvas PlatformCanvas;
@@ -171,6 +173,19 @@ class SK_API ScopedPlatformPaint {
ScopedPlatformPaint& operator=(const ScopedPlatformPaint&);
};
+// Following routines are used in print preview workflow to mark the
+// preview metafile.
+SK_API SkMetaData& GetMetaData(const SkCanvas& canvas);
+
+#if defined(OS_MACOSX)
+SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview);
+SK_API bool IsPreviewMetafile(const SkCanvas& canvas);
+
+// Returns the CGContext that backing the SkCanvas.
+// Returns NULL if none is bound.
+SK_API CGContextRef GetBitmapContext(const SkCanvas& canvas);
+#endif
+
} // namespace skia
#endif // SKIA_EXT_PLATFORM_CANVAS_H_
diff --git a/skia/ext/platform_device.cc b/skia/ext/platform_device.cc
index e13e1dc..cd4aa09 100644
--- a/skia/ext/platform_device.cc
+++ b/skia/ext/platform_device.cc
@@ -7,33 +7,15 @@
#include "third_party/skia/include/core/SkMetaData.h"
-namespace skia {
-
namespace {
const char kDevicePlatformBehaviour[] = "CrDevicePlatformBehaviour";
-#if defined(OS_MACOSX)
-const char kIsPreviewMetafileKey[] = "CrIsPreviewMetafile";
-
-void SetBoolMetaData(const SkCanvas& canvas, const char* key, bool value) {
- SkMetaData& meta = skia::getMetaData(canvas);
- meta.setBool(key, value);
-}
-
-bool GetBoolMetaData(const SkCanvas& canvas, const char* key) {
- bool value;
- SkMetaData& meta = skia::getMetaData(canvas);
- if (!meta.findBool(key, &value))
- value = false;
- return value;
-}
-#endif
-
} // namespace
-void SetPlatformDevice(SkBaseDevice* device,
- PlatformDevice* platform_behaviour) {
+namespace skia {
+
+void SetPlatformDevice(SkBaseDevice* device, PlatformDevice* platform_behaviour) {
SkMetaData& meta_data = device->getMetaData();
meta_data.setPtr(kDevicePlatformBehaviour, platform_behaviour);
}
@@ -49,22 +31,6 @@ PlatformDevice* GetPlatformDevice(SkBaseDevice* device) {
return NULL;
}
-SkMetaData& getMetaData(const SkCanvas& canvas) {
- SkBaseDevice* device = canvas.getDevice();
- DCHECK(device != NULL);
- return device->getMetaData();
-}
-
-#if defined(OS_MACOSX)
-void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview) {
- SetBoolMetaData(canvas, kIsPreviewMetafileKey, is_preview);
-}
-
-bool IsPreviewMetafile(const SkCanvas& canvas) {
- return GetBoolMetaData(canvas, kIsPreviewMetafileKey);
-}
-#endif
-
bool PlatformDevice::SupportsPlatformPaint() {
return true;
}
diff --git a/skia/ext/platform_device.h b/skia/ext/platform_device.h
index fa60afb..5b718d2 100644
--- a/skia/ext/platform_device.h
+++ b/skia/ext/platform_device.h
@@ -12,41 +12,18 @@
#include <vector>
#endif
-#include "third_party/skia/include/core/SkColor.h"
+#include "skia/ext/platform_surface.h"
#include "third_party/skia/include/core/SkBitmapDevice.h"
#include "third_party/skia/include/core/SkTypes.h"
class SkMatrix;
-class SkMetaData;
class SkPath;
class SkRegion;
-#if defined(USE_CAIRO)
-typedef struct _cairo cairo_t;
-typedef struct _cairo_rectangle cairo_rectangle_t;
-#elif defined(OS_MACOSX)
-typedef struct CGContext* CGContextRef;
-typedef struct CGRect CGRect;
-#endif
-
namespace skia {
class PlatformDevice;
-#if defined(OS_WIN)
-typedef HDC PlatformSurface;
-typedef RECT PlatformRect;
-#elif defined(USE_CAIRO)
-typedef cairo_t* PlatformSurface;
-typedef cairo_rectangle_t PlatformRect;
-#elif defined(OS_MACOSX)
-typedef CGContextRef PlatformSurface;
-typedef CGRect PlatformRect;
-#else
-typedef void* PlatformSurface;
-typedef SkIRect* PlatformRect;
-#endif
-
// The following routines provide accessor points for the functionality
// exported by the various PlatformDevice ports.
// All calls to PlatformDevice::* should be routed through these
@@ -65,19 +42,6 @@ SK_API PlatformDevice* GetPlatformDevice(SkBaseDevice* device);
#if defined(OS_WIN)
// Initializes the default settings and colors in a device context.
SK_API void InitializeDC(HDC context);
-#elif defined(OS_MACOSX)
-// Returns the CGContext that backing the SkBaseDevice. Forwards to the bound
-// PlatformDevice. Returns NULL if no PlatformDevice is bound.
-SK_API CGContextRef GetBitmapContext(SkBaseDevice* device);
-#endif
-
-// Following routines are used in print preview workflow to mark the
-// preview metafile.
-SK_API SkMetaData& getMetaData(const SkCanvas& canvas);
-
-#if defined(OS_MACOSX)
-SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview);
-SK_API bool IsPreviewMetafile(const SkCanvas& canvas);
#endif
// A SkBitmapDevice is basically a wrapper around SkBitmap that provides a
diff --git a/skia/ext/platform_device_mac.cc b/skia/ext/platform_device_mac.cc
index 065b767..5dfa211 100644
--- a/skia/ext/platform_device_mac.cc
+++ b/skia/ext/platform_device_mac.cc
@@ -7,21 +7,9 @@
#import <ApplicationServices/ApplicationServices.h>
#include "skia/ext/skia_utils_mac.h"
-#include "third_party/skia/include/core/SkMatrix.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "third_party/skia/include/core/SkTypes.h"
-#include "third_party/skia/include/core/SkUtils.h"
namespace skia {
-CGContextRef GetBitmapContext(SkBaseDevice* device) {
- PlatformDevice* platform_device = GetPlatformDevice(device);
- if (platform_device)
- return platform_device->GetBitmapContext();
-
- return NULL;
-}
-
CGContextRef PlatformDevice::BeginPlatformPaint() {
return GetBitmapContext();
}
diff --git a/skia/ext/platform_device_win.cc b/skia/ext/platform_device_win.cc
index ef48fbd..79b2c30 100644
--- a/skia/ext/platform_device_win.cc
+++ b/skia/ext/platform_device_win.cc
@@ -8,7 +8,6 @@
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkRegion.h"
-#include "third_party/skia/include/core/SkUtils.h"
namespace skia {
diff --git a/skia/ext/platform_surface.h b/skia/ext/platform_surface.h
new file mode 100644
index 0000000..b0d5173
--- /dev/null
+++ b/skia/ext/platform_surface.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SKIA_EXT_PLATFORM_SURFACE_H_
+#define SKIA_EXT_PLATFORM_SURFACE_H_
+
+#include "build/build_config.h"
+
+#include "third_party/skia/include/core/SkTypes.h"
+#include "third_party/skia/include/core/SkRect.h"
+
+#if defined(USE_CAIRO)
+typedef struct _cairo cairo_t;
+typedef struct _cairo_rectangle cairo_rectangle_t;
+#elif defined(OS_MACOSX)
+typedef struct CGContext* CGContextRef;
+typedef struct CGRect CGRect;
+#endif
+
+namespace skia {
+
+#if defined(OS_WIN)
+typedef HDC PlatformSurface;
+typedef RECT PlatformRect;
+#elif defined(USE_CAIRO)
+typedef cairo_t* PlatformSurface;
+typedef cairo_rectangle_t PlatformRect;
+#elif defined(OS_MACOSX)
+typedef CGContextRef PlatformSurface;
+typedef CGRect PlatformRect;
+#else
+typedef void* PlatformSurface;
+typedef SkIRect* PlatformRect;
+#endif
+
+} // namespace skia
+
+#endif // SKIA_EXT_PLATFORM_SURFACE_H_
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm
index fe05464c..32466f1 100644
--- a/skia/ext/skia_utils_mac.mm
+++ b/skia/ext/skia_utils_mac.mm
@@ -190,10 +190,10 @@ SkBitmap CGImageToSkBitmap(CGImageRef image) {
int width = CGImageGetWidth(image);
int height = CGImageGetHeight(image);
- scoped_ptr<SkBaseDevice> device(
+ scoped_ptr<skia::BitmapPlatformDevice> device(
skia::BitmapPlatformDevice::Create(NULL, width, height, false));
- CGContextRef context = skia::GetBitmapContext(device.get());
+ CGContextRef context = device->GetBitmapContext();
// We need to invert the y-axis of the canvas so that Core Graphics drawing
// happens right-side up. Skia has an upper-left origin and CG has a lower-
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index a644ab7..94d44ff 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -35,7 +35,7 @@
#include "platform/graphics/ImageBuffer.h"
#include "platform/graphics/paint/PaintController.h"
#include "platform/weborigin/KURL.h"
-#include "skia/ext/platform_device.h"
+#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkAnnotation.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkData.h"
@@ -301,7 +301,7 @@ void GraphicsContext::beginRecording(const FloatRect& bounds)
m_canvas = m_pictureRecorder.beginRecording(bounds, 0);
if (m_hasMetaData)
- skia::getMetaData(*m_canvas) = m_metaData;
+ skia::GetMetaData(*m_canvas) = m_metaData;
}
PassRefPtr<const SkPicture> GraphicsContext::endRecording()
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index f6a7810..a2c0cb6 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -219,7 +219,7 @@
#include "public/web/WebSerializedScriptValue.h"
#include "public/web/WebTestInterfaceFactory.h"
#include "public/web/WebTreeScopeType.h"
-#include "skia/ext/platform_device.h"
+#include "skia/ext/platform_canvas.h"
#include "web/AssociatedURLLoader.h"
#include "web/AudioOutputDeviceClientImpl.h"
#include "web/CompositionUnderlineVectorBuilder.h"
@@ -370,7 +370,7 @@ public:
return 0;
IntRect pageRect = m_pageRects[pageNumber];
- SkPictureBuilder pictureBuilder(pageRect, &skia::getMetaData(*canvas));
+ SkPictureBuilder pictureBuilder(pageRect, &skia::GetMetaData(*canvas));
pictureBuilder.context().setPrinting(true);
float scale = spoolPage(pictureBuilder.context(), pageNumber);
@@ -397,7 +397,7 @@ public:
int totalHeight = numPages * (pageSizeInPixels.height() + 1) - 1;
IntRect allPagesRect(0, 0, pageWidth, totalHeight);
- SkPictureBuilder pictureBuilder(allPagesRect, &skia::getMetaData(*canvas));
+ SkPictureBuilder pictureBuilder(allPagesRect, &skia::GetMetaData(*canvas));
pictureBuilder.context().setPrinting(true);
GraphicsContext& context = pictureBuilder.context();
diff --git a/ui/gfx/canvas_paint_mac.mm b/ui/gfx/canvas_paint_mac.mm
index 4cb2da0..cc1c6a4 100644
--- a/ui/gfx/canvas_paint_mac.mm
+++ b/ui/gfx/canvas_paint_mac.mm
@@ -68,7 +68,7 @@ void CanvasSkiaPaint::Init(bool opaque) {
canvas->translate(-SkDoubleToScalar(NSMinX(rectangle_)),
-SkDoubleToScalar(NSMinY(rectangle_)));
- context_ = skia::GetBitmapContext(skia::GetTopDevice(*canvas));
+ context_ = skia::GetBitmapContext(*canvas);
}
} // namespace skia