| Index: content/renderer/gpu/compositor_software_output_device.cc
|
| diff --git a/content/renderer/gpu/compositor_software_output_device.cc b/content/renderer/gpu/compositor_software_output_device.cc
|
| index 4b23919203be441c98ff34da38b3c7dfef0c9a83..93155cc9ceeabfff34a1730f15c3e74c097b9c94 100644
|
| --- a/content/renderer/gpu/compositor_software_output_device.cc
|
| +++ b/content/renderer/gpu/compositor_software_output_device.cc
|
| @@ -152,9 +152,8 @@ SkCanvas* CompositorSoftwareOutputDevice::BeginPaint(
|
| // Set up a canvas for the current front buffer.
|
| SkImageInfo info = SkImageInfo::MakeN32Premul(viewport_pixel_size_.width(),
|
| viewport_pixel_size_.height());
|
| - SkBitmap bitmap;
|
| - bitmap.installPixels(info, current->memory(), info.minRowBytes());
|
| - canvas_ = skia::AdoptRef(new SkCanvas(bitmap));
|
| + surface_ = skia::AdoptRef(SkSurface::NewRasterDirect(info, current->memory(),
|
| + info.minRowBytes()));
|
|
|
| if (!previous) {
|
| DCHECK(damage_rect == gfx::Rect(viewport_pixel_size_));
|
| @@ -179,7 +178,7 @@ SkCanvas* CompositorSoftwareOutputDevice::BeginPaint(
|
| for (SkRegion::Iterator it(region); !it.done(); it.next()) {
|
| const SkIRect& src_rect = it.rect();
|
| SkRect dst_rect = SkRect::Make(src_rect);
|
| - canvas_->drawBitmapRect(back_bitmap, &src_rect, dst_rect, NULL);
|
| + surface_->getCanvas()->drawBitmapRect(back_bitmap, &src_rect, dst_rect);
|
| }
|
| }
|
| }
|
| @@ -193,7 +192,7 @@ SkCanvas* CompositorSoftwareOutputDevice::BeginPaint(
|
| }
|
| damage_rect_ = damage_rect;
|
|
|
| - return canvas_.get();
|
| + return surface_->getCanvas();
|
| }
|
|
|
| void CompositorSoftwareOutputDevice::EndPaint(
|
|
|