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

Side by Side Diff: skia/ext/vector_canvas_linux.cc

Issue 6665046: Unfork VectorPlatformCanvas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « skia/ext/vector_canvas.cc ('k') | skia/ext/vector_canvas_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "skia/ext/vector_canvas.h"
6
7 #include "skia/ext/vector_platform_device.h"
8
9 namespace skia {
10
11 VectorCanvas::VectorCanvas(cairo_t* context, int width, int height) {
12 bool initialized = initialize(context, width, height);
13
14 SkASSERT(initialized);
15 }
16
17 bool VectorCanvas::initialize(cairo_t* context, int width, int height) {
18 SkDevice* device = VectorPlatformDeviceFactory::CreateDevice(context, width,
19 height, true);
20 if (!device)
21 return false;
22
23 setDevice(device);
24 device->unref(); // was created with refcount 1, and setDevice also refs
25 return true;
26 }
27
28 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/vector_canvas.cc ('k') | skia/ext/vector_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698