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

Unified Diff: ui/ozone/platform/caca/caca_surface_factory.cc

Issue 247933003: ozone: caca: Fix the build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/caca/caca_surface_factory.h ('k') | ui/ozone/platform/caca/ozone_platform_caca.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/caca/caca_surface_factory.cc
diff --git a/ui/ozone/platform/caca/caca_surface_factory.cc b/ui/ozone/platform/caca/caca_surface_factory.cc
index 13b8a8c01ed51fc5f36fadf60bd681ae1989613e..1786831cb9cea87ab6209eaee7165afab3834bc0 100644
--- a/ui/ozone/platform/caca/caca_surface_factory.cc
+++ b/ui/ozone/platform/caca/caca_surface_factory.cc
@@ -23,6 +23,8 @@ class CacaSurface : public gfx::SurfaceOzoneCanvas {
CacaSurface(CacaConnection* connection);
virtual ~CacaSurface();
+ bool Initialize();
+
// gfx::SurfaceOzoneCanvas overrides:
virtual skia::RefPtr<SkCanvas> GetCanvas() OVERRIDE;
virtual bool ResizeCanvas(const gfx::Size& viewport_size) OVERRIDE;
@@ -46,7 +48,7 @@ CacaSurface::~CacaSurface() {
caca_free_dither(dither_);
}
-bool CacaSurface::InitializeCanvas() {
+bool CacaSurface::Initialize() {
SkImageInfo info = SkImageInfo::Make(connection_->bitmap_size().width(),
connection_->bitmap_size().height(),
kPMColor_SkColorType,
@@ -140,7 +142,9 @@ scoped_ptr<gfx::SurfaceOzoneCanvas> CacaSurfaceFactory::CreateCanvasForWidget(
CHECK_EQ(INITIALIZED, state_);
CHECK_EQ(kDefaultWidgetHandle, widget);
- return make_scoped_ptr<gfx::SurfaceOzoneCanvas>(new CacaSurface(connection_));
+ scoped_ptr<CacaSurface> canvas(new CacaSurface(connection_));
+ CHECK(canvas->Initialize());
+ return canvas.PassAs<gfx::SurfaceOzoneCanvas>();
}
} // namespace ui
« no previous file with comments | « ui/ozone/platform/caca/caca_surface_factory.h ('k') | ui/ozone/platform/caca/ozone_platform_caca.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698