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

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

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Syncing merge conflicts. Created 9 years, 6 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_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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "third_party/skia/include/core/SkDevice.h"
6 7
7 namespace skia { 8 namespace skia {
8 9
9 VectorCanvas::VectorCanvas(PlatformDevice* device) 10 VectorCanvas::VectorCanvas(SkDevice* device)
10 : PlatformCanvas(device->getDeviceFactory()) { 11 : PlatformCanvas(device->getDeviceFactory()) {
11 setDevice(device)->unref(); // Created with refcount 1, and setDevice refs. 12 setDevice(device)->unref(); // Created with refcount 1, and setDevice refs.
12 } 13 }
13 14
14 VectorCanvas::~VectorCanvas() { 15 VectorCanvas::~VectorCanvas() {
15 } 16 }
16 17
17 SkBounder* VectorCanvas::setBounder(SkBounder* bounder) { 18 SkBounder* VectorCanvas::setBounder(SkBounder* bounder) {
18 if (!IsTopDeviceVectorial()) 19 if (!IsTopDeviceVectorial())
19 return PlatformCanvas::setBounder(bounder); 20 return PlatformCanvas::setBounder(bounder);
20 21
21 // This function isn't used in the code. Verify this assumption. 22 // This function isn't used in the code. Verify this assumption.
22 SkASSERT(false); 23 SkASSERT(false);
23 return NULL; 24 return NULL;
24 } 25 }
25 26
26 SkDrawFilter* VectorCanvas::setDrawFilter(SkDrawFilter* filter) { 27 SkDrawFilter* VectorCanvas::setDrawFilter(SkDrawFilter* filter) {
27 // This function isn't used in the code. Verify this assumption. 28 // This function isn't used in the code. Verify this assumption.
28 SkASSERT(false); 29 SkASSERT(false);
29 return NULL; 30 return NULL;
30 } 31 }
31 32
32 bool VectorCanvas::IsTopDeviceVectorial() const { 33 bool VectorCanvas::IsTopDeviceVectorial() const {
33 return getTopPlatformDevice().IsVectorial(); 34 return IsVectorial(GetTopDevice(*this));
34 } 35 }
35 36
36 } // namespace skia 37 } // namespace skia
37 38
OLDNEW
« no previous file with comments | « skia/ext/vector_canvas.h ('k') | skia/ext/vector_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698