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

Unified Diff: skia/ext/bitmap_platform_device_win.cc

Issue 2622713002: Remove bitmap_platform_device_skia (Closed)
Patch Set: Win build fix Created 3 years, 11 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 | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_win.cc
diff --git a/skia/ext/bitmap_platform_device_win.cc b/skia/ext/bitmap_platform_device_win.cc
index 34b7e2fe9b68cf30d2864112dd27cf39d688eeba..41c121c7411db4e59663a053575233d09d768d73 100644
--- a/skia/ext/bitmap_platform_device_win.cc
+++ b/skia/ext/bitmap_platform_device_win.cc
@@ -8,6 +8,7 @@
#include "base/debug/gdi_debug_util_win.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/win/win_util.h"
#include "skia/ext/bitmap_platform_device_win.h"
#include "skia/ext/platform_canvas.h"
@@ -210,9 +211,15 @@ std::unique_ptr<SkCanvas> CreatePlatformCanvasWithSharedSection(
bool is_opaque,
HANDLE shared_section,
OnFailureType failureType) {
- sk_sp<SkBaseDevice> dev(
+ sk_sp<SkBaseDevice> device(
BitmapPlatformDevice::Create(width, height, is_opaque, shared_section));
- return CreateCanvas(dev, failureType);
+ if (!device) {
+ if (CRASH_ON_FAILURE == failureType)
+ SK_CRASH();
+ return nullptr;
+ }
+
+ return base::MakeUnique<SkCanvas>(device.get());
}
} // namespace skia
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698