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

Unified Diff: skia/ext/platform_canvas_win.cc

Issue 3590011: Update use of SkCanvas and SkDevice to match change in Skia (Closed)
Patch Set: Bump deps again to bring in fix for memory leak Created 10 years, 2 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/platform_canvas_mac.cc ('k') | skia/ext/vector_canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas_win.cc
diff --git a/skia/ext/platform_canvas_win.cc b/skia/ext/platform_canvas_win.cc
index 3495403cd845ac4edc77b7679db2c585a714e943..fe63daf37958c32891c9911f6abd7dd8a718311b 100644
--- a/skia/ext/platform_canvas_win.cc
+++ b/skia/ext/platform_canvas_win.cc
@@ -76,11 +76,8 @@ void CrashIfInvalidSection(HANDLE shared_section) {
// Restore the optimization options.
#pragma optimize("", on)
-PlatformCanvas::PlatformCanvas() : SkCanvas() {
-}
-
PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque)
- : SkCanvas() {
+ : SkCanvas(SkNEW(SkBitmapPlatformDeviceFactory)) {
bool initialized = initialize(width, height, is_opaque, NULL);
if (!initialized)
CrashForBitmapAllocationFailure(width, height);
@@ -90,7 +87,7 @@ PlatformCanvas::PlatformCanvas(int width,
int height,
bool is_opaque,
HANDLE shared_section)
- : SkCanvas() {
+ : SkCanvas(SkNEW(SkBitmapPlatformDeviceFactory)) {
bool initialized = initialize(width, height, is_opaque, shared_section);
if (!initialized) {
CrashIfInvalidSection(shared_section);
@@ -124,12 +121,4 @@ void PlatformCanvas::endPlatformPaint() {
// flushing will be done in onAccessBitmap
}
-SkDevice* PlatformCanvas::createDevice(SkBitmap::Config config,
- int width,
- int height,
- bool is_opaque, bool isForLayer) {
- SkASSERT(config == SkBitmap::kARGB_8888_Config);
- return BitmapPlatformDevice::create(width, height, is_opaque, NULL);
-}
-
} // namespace skia
« no previous file with comments | « skia/ext/platform_canvas_mac.cc ('k') | skia/ext/vector_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698