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

Unified Diff: ui/ozone/platform/drm/gpu/drm_buffer.cc

Issue 1855273002: Update new Surface callsites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: software_output_device was indirectly including skia::refptr, switch to sk_sp<> Created 4 years, 8 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 | « ui/ozone/platform/drm/gpu/drm_buffer.h ('k') | ui/ozone/platform/drm/gpu/drm_console_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_buffer.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_buffer.cc b/ui/ozone/platform/drm/gpu/drm_buffer.cc
index bd2e9a9367197412a12a3dead76d452ffc0e1ffa..1c50f1c472416a23393d4f145252baa5294161f5 100644
--- a/ui/ozone/platform/drm/gpu/drm_buffer.cc
+++ b/ui/ozone/platform/drm/gpu/drm_buffer.cc
@@ -38,8 +38,6 @@ DrmBuffer::DrmBuffer(const scoped_refptr<DrmDevice>& drm) : drm_(drm) {
}
DrmBuffer::~DrmBuffer() {
- surface_.clear();
-
if (framebuffer_ && !drm_->RemoveFramebuffer(framebuffer_))
PLOG(ERROR) << "DrmBuffer: RemoveFramebuffer: fb " << framebuffer_;
@@ -78,8 +76,7 @@ bool DrmBuffer::Initialize(const SkImageInfo& info,
}
}
- surface_ =
- skia::AdoptRef(SkSurface::NewRasterDirect(info, mmap_base_, stride_));
+ surface_ = SkSurface::MakeRasterDirect(info, mmap_base_, stride_);
if (!surface_) {
LOG(ERROR) << "DrmBuffer: Failed to create SkSurface: handle " << handle_;
return false;
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_buffer.h ('k') | ui/ozone/platform/drm/gpu/drm_console_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698