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

Unified Diff: content/browser/compositor/software_output_device_win.cc

Issue 2509983004: Revert "Change call-sites now that SkCanvas is not ref-counted" (Closed)
Patch Set: Created 4 years, 1 month 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
Index: content/browser/compositor/software_output_device_win.cc
diff --git a/content/browser/compositor/software_output_device_win.cc b/content/browser/compositor/software_output_device_win.cc
index 2edf325b360a6681691ba6959ac103881b78519a..c48bed4fa0ebf03724dabf1197aee6e3aa61068d 100644
--- a/content/browser/compositor/software_output_device_win.cc
+++ b/content/browser/compositor/software_output_device_win.cc
@@ -139,9 +139,9 @@ SkCanvas* SoftwareOutputDeviceWin::BeginPaint(const gfx::Rect& damage_rect) {
}
}
if (can_create_contents) {
- contents_ = skia::CreatePlatformCanvas(
+ contents_ = sk_sp<SkCanvas>(skia::CreatePlatformCanvas(
viewport_pixel_size_.width(), viewport_pixel_size_.height(), true,
- shared_section, skia::CRASH_ON_FAILURE);
+ shared_section, skia::CRASH_ON_FAILURE));
}
}
@@ -192,6 +192,7 @@ void SoftwareOutputDeviceWin::EndPaint() {
}
void SoftwareOutputDeviceWin::ReleaseContents() {
+ DCHECK(!contents_ || contents_->unique());
DCHECK(!in_paint_);
contents_.reset();
}
« no previous file with comments | « content/browser/compositor/software_output_device_win.h ('k') | content/renderer/pepper/pepper_plugin_instance_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698