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

Unified Diff: skia/ext/vector_platform_device_skia.cc

Issue 9416017: Optionally clear PlatformCanvas instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address comments. Created 8 years, 9 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/vector_platform_device_emf_win.cc ('k') | ui/gfx/canvas_skia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_platform_device_skia.cc
===================================================================
--- skia/ext/vector_platform_device_skia.cc (revision 127021)
+++ skia/ext/vector_platform_device_skia.cc (working copy)
@@ -41,19 +41,9 @@
// and return the context from it, then layer on the raster data as an
// image in EndPlatformPaint.
DCHECK(raster_surface_ == NULL);
-#if defined(OS_WIN)
- raster_surface_ = BitmapPlatformDevice::create(width(),
- height(),
- false, /* not opaque */
- NULL);
-#elif defined(OS_POSIX) && !defined(OS_MACOSX)
- raster_surface_ = BitmapPlatformDevice::Create(width(),
- height(),
- false /* not opaque */);
-#endif
+ raster_surface_ = BitmapPlatformDevice::CreateAndClear(width(), height(),
+ false);
raster_surface_->unref(); // SkRefPtr and create both took a reference.
-
- SkCanvas canvas(raster_surface_.get());
return raster_surface_->BeginPlatformPaint();
}
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.cc ('k') | ui/gfx/canvas_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698