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 #ifndef SKIA_EXT_VECTOR_CANVAS_H_
6 #define SKIA_EXT_VECTOR_CANVAS_H_
9 #include "base/compiler_specific.h"
10 #include "skia/ext/platform_canvas.h"
16 // This class is a specialization of the regular PlatformCanvas. It is designed
17 // to work with a VectorDevice to manage platform-specific drawing. It allows
18 // using both Skia operations and platform-specific operations. It *doesn't*
19 // support reading back from the bitmap backstore since it is not used.
20 class SK_API VectorCanvas
: public PlatformCanvas
{
22 // Ownership of |device| is transfered to VectorCanvas.
23 explicit VectorCanvas(SkDevice
* device
);
24 virtual ~VectorCanvas();
26 virtual SkBounder
* setBounder(SkBounder
* bounder
) OVERRIDE
;
27 virtual SkDrawFilter
* setDrawFilter(SkDrawFilter
* filter
) OVERRIDE
;
30 // Returns true if the top device is vector based and not bitmap based.
31 bool IsTopDeviceVectorial() const;
33 // Copy & assign are not supported.
34 VectorCanvas(const VectorCanvas
&);
35 const VectorCanvas
& operator=(const VectorCanvas
&);
40 #endif // SKIA_EXT_VECTOR_CANVAS_H_