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

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

Issue 6665046: Unfork VectorPlatformCanvas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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.h ('k') | skia/ext/vector_canvas_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "skia/ext/vector_canvas.h" 5 #include "skia/ext/vector_canvas.h"
6 6
7 #include "skia/ext/vector_platform_device.h"
8
7 namespace skia { 9 namespace skia {
8 10
9 VectorCanvas::VectorCanvas() 11 VectorCanvas::VectorCanvas(PlatformDevice* device)
10 : PlatformCanvas(SkNEW(VectorPlatformDeviceFactory)) { 12 : PlatformCanvas(device->getDeviceFactory()) {
11 } 13 setDevice(device);
reed1 2011/03/17 20:06:53 standard pattern is this->setDevice(device)->unre
12 14 device->unref(); // was created with refcount 1, and setDevice also refs
13 VectorCanvas::VectorCanvas(SkDeviceFactory* factory) : PlatformCanvas(factory) {
14 } 15 }
15 16
16 VectorCanvas::~VectorCanvas() { 17 VectorCanvas::~VectorCanvas() {
17 } 18 }
18 19
19 SkBounder* VectorCanvas::setBounder(SkBounder* bounder) { 20 SkBounder* VectorCanvas::setBounder(SkBounder* bounder) {
20 if (!IsTopDeviceVectorial()) 21 if (!IsTopDeviceVectorial())
21 return PlatformCanvas::setBounder(bounder); 22 return PlatformCanvas::setBounder(bounder);
22 23
23 // This function isn't used in the code. Verify this assumption. 24 // This function isn't used in the code. Verify this assumption.
24 SkASSERT(false); 25 SkASSERT(false);
25 return NULL; 26 return NULL;
26 } 27 }
27 28
28 SkDrawFilter* VectorCanvas::setDrawFilter(SkDrawFilter* filter) { 29 SkDrawFilter* VectorCanvas::setDrawFilter(SkDrawFilter* filter) {
29 // This function isn't used in the code. Verify this assumption. 30 // This function isn't used in the code. Verify this assumption.
30 SkASSERT(false); 31 SkASSERT(false);
31 return NULL; 32 return NULL;
32 } 33 }
33 34
34 bool VectorCanvas::IsTopDeviceVectorial() const { 35 bool VectorCanvas::IsTopDeviceVectorial() const {
35 return getTopPlatformDevice().IsVectorial(); 36 return getTopPlatformDevice().IsVectorial();
36 } 37 }
37 38
38 } // namespace skia 39 } // namespace skia
39 40
OLDNEW
« no previous file with comments | « skia/ext/vector_canvas.h ('k') | skia/ext/vector_canvas_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698