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

Unified Diff: ui/surface/transport_dib_linux.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « ui/surface/transport_dib_android.cc ('k') | ui/surface/transport_dib_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/surface/transport_dib_linux.cc
===================================================================
--- ui/surface/transport_dib_linux.cc (revision 167659)
+++ ui/surface/transport_dib_linux.cc (working copy)
@@ -94,10 +94,9 @@
skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
if (address_ == kInvalidAddress && !Map())
return NULL;
- scoped_ptr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas);
- if (!canvas->initialize(w, h, true, reinterpret_cast<uint8_t*>(memory())))
- return NULL;
- return canvas.release();
+ return skia::CreatePlatformCanvas(w, h, true,
+ reinterpret_cast<uint8_t*>(memory()),
+ skia::RETURN_NULL_ON_FAILURE);
}
bool TransportDIB::Map() {
« no previous file with comments | « ui/surface/transport_dib_android.cc ('k') | ui/surface/transport_dib_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698