Roll leveldb from r73 to r75.
[chromium-blink-merge.git] / skia / ext / vector_canvas.cc
blob9de6b3d0c5923dc471c5b333f86853a5a5b714d3
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
3 // found in the LICENSE file.
5 #include "skia/ext/vector_canvas.h"
6 #include "third_party/skia/include/core/SkDevice.h"
8 namespace skia {
10 VectorCanvas::VectorCanvas(SkDevice* device)
11 : PlatformCanvas(device) {
14 VectorCanvas::~VectorCanvas() {
17 SkBounder* VectorCanvas::setBounder(SkBounder* bounder) {
18 if (!IsTopDeviceVectorial())
19 return PlatformCanvas::setBounder(bounder);
21 // This function isn't used in the code. Verify this assumption.
22 SkASSERT(false);
23 return NULL;
26 SkDrawFilter* VectorCanvas::setDrawFilter(SkDrawFilter* filter) {
27 // This function isn't used in the code. Verify this assumption.
28 SkASSERT(false);
29 return NULL;
32 bool VectorCanvas::IsTopDeviceVectorial() const {
33 SkDevice* device = GetTopDevice(*this);
34 return device->getDeviceCapabilities() & SkDevice::kVector_Capability;
37 } // namespace skia