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

Unified Diff: skia/ext/platform_canvas_mac.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_linux.cc ('k') | skia/ext/platform_canvas_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas_mac.cc
diff --git a/skia/ext/platform_canvas_mac.cc b/skia/ext/platform_canvas_mac.cc
index 33d7eb207574e390ccd415ff97487c51d4f96eec..df3d0ce6df957c974463ee1bfa5dcd6b52ae0d09 100644
--- a/skia/ext/platform_canvas_mac.cc
+++ b/skia/ext/platform_canvas_mac.cc
@@ -9,11 +9,8 @@
namespace skia {
-PlatformCanvas::PlatformCanvas() : SkCanvas() {
-}
-
PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque)
- : SkCanvas() {
+ : SkCanvas(SkNEW(SkBitmapPlatformDeviceFactory)) {
initialize(width, height, is_opaque);
}
@@ -21,7 +18,7 @@ PlatformCanvas::PlatformCanvas(int width,
int height,
bool is_opaque,
CGContextRef context)
- : SkCanvas() {
+ : SkCanvas(SkNEW(SkBitmapPlatformDeviceFactory)) {
initialize(width, height, is_opaque);
}
@@ -29,7 +26,7 @@ PlatformCanvas::PlatformCanvas(int width,
int height,
bool is_opaque,
uint8_t* data)
- : SkCanvas() {
+ : SkCanvas(SkNEW(SkBitmapPlatformDeviceFactory)) {
initialize(width, height, is_opaque, data);
}
@@ -58,12 +55,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(NULL, width, height, is_opaque);
-}
-
} // namespace skia
« no previous file with comments | « skia/ext/platform_canvas_linux.cc ('k') | skia/ext/platform_canvas_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698