diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-03 21:30:15 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-03 21:30:15 +0000 |
commit | 9a52116427ee92ef7470d1dd387d31c2d55e6b62 (patch) | |
tree | 4cf7c9f77b04fef53d505fefbc52b646f83c03ea /cc | |
parent | 79a702895e17d13056da5454830de5a9244b4f04 (diff) | |
download | chromium_src-9a52116427ee92ef7470d1dd387d31c2d55e6b62.zip chromium_src-9a52116427ee92ef7470d1dd387d31c2d55e6b62.tar.gz chromium_src-9a52116427ee92ef7470d1dd387d31c2d55e6b62.tar.bz2 |
don't create SkDevice directly, use SkBitmap or (better) SkCanvas::NewRaster factory
BUG=skia:2239
TBR=scherkus@chromium.org
Review URL: https://codereview.chromium.org/184743002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/output/gl_renderer.cc | 3 | ||||
-rw-r--r-- | cc/resources/resource_provider.cc | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index e412282..bd1e3ca 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc @@ -95,8 +95,7 @@ class OnDemandRasterTaskImpl : public internal::Task { // Overridden from internal::Task: virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE { TRACE_EVENT0("cc", "OnDemandRasterTaskImpl::RunOnWorkerThread"); - SkBitmapDevice device(*bitmap_); - SkCanvas canvas(&device); + SkCanvas canvas(*bitmap_); picture_pile_->RasterToBitmap( &canvas, content_rect_, contents_scale_, NULL); } diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc index e58ed0b..c751e7c 100644 --- a/cc/resources/resource_provider.cc +++ b/cc/resources/resource_provider.cc @@ -497,9 +497,7 @@ SkCanvas* ResourceProvider::BitmapRasterBuffer::DoLockForWrite() { NOTREACHED(); break; } - skia::RefPtr<SkBitmapDevice> device = - skia::AdoptRef(new SkBitmapDevice(raster_bitmap_)); - raster_canvas_ = skia::AdoptRef(new SkCanvas(device.get())); + raster_canvas_ = skia::AdoptRef(new SkCanvas(raster_bitmap_)); raster_bitmap_generation_id_ = raster_bitmap_.getGenerationID(); return raster_canvas_.get(); } |