OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef BASE_GFX_PLATFORM_CANVAS_LINUX_H_ | 5 #ifndef PlatformCanvasLinux_h |
6 #define BASE_GFX_PLATFORM_CANVAS_LINUX_H_ | 6 #define PlatformCanvasLinux_h |
7 | 7 |
8 #include "base/gfx/platform_device_linux.h" | 8 #include "PlatformCanvasLinux.h" |
9 #include "base/basictypes.h" | |
10 | 9 |
11 namespace gfx { | 10 namespace gfx { |
12 | 11 |
13 // This class is a specialization of the regular SkCanvas that is designed to | 12 // This class is a specialization of the regular SkCanvas that is designed to |
14 // work with a gfx::PlatformDevice to manage platform-specific drawing. It | 13 // work with a gfx::PlatformDevice to manage platform-specific drawing. It |
15 // allows using both Skia operations and platform-specific operations. | 14 // allows using both Skia operations and platform-specific operations. |
16 class PlatformCanvasLinux : public SkCanvas { | 15 class PlatformCanvasLinux : public SkCanvas { |
17 public: | 16 public: |
18 // Set is_opaque if you are going to erase the bitmap and not use | 17 // Set is_opaque if you are going to erase the bitmap and not use |
19 // tranparency: this will enable some optimizations. The shared_section | 18 // tranparency: this will enable some optimizations. The shared_section |
(...skipping 16 matching lines...) Expand all Loading... |
36 // Creates a device store for use by the canvas. We override this so that | 35 // Creates a device store for use by the canvas. We override this so that |
37 // the device is always our own so we know that we can use GDI operations | 36 // the device is always our own so we know that we can use GDI operations |
38 // on it. Simply calls into createPlatformDevice(). | 37 // on it. Simply calls into createPlatformDevice(). |
39 virtual SkDevice* createDevice(SkBitmap::Config, int width, int height, | 38 virtual SkDevice* createDevice(SkBitmap::Config, int width, int height, |
40 bool is_opaque); | 39 bool is_opaque); |
41 | 40 |
42 // Creates a device store for use by the canvas. By default, it creates a | 41 // Creates a device store for use by the canvas. By default, it creates a |
43 // BitmapPlatformDevice object. Can be overridden to change the object type. | 42 // BitmapPlatformDevice object. Can be overridden to change the object type. |
44 virtual SkDevice* createPlatformDevice(int width, int height, bool is_opaque); | 43 virtual SkDevice* createPlatformDevice(int width, int height, bool is_opaque); |
45 | 44 |
46 DISALLOW_COPY_AND_ASSIGN(PlatformCanvasLinux); | 45 // Disallow copy and assign. |
| 46 PlatformCanvasLinux(const PlatformCanvasLinux&); |
| 47 PlatformCanvasLinux& operator=(const PlatformCanvasLinux&); |
47 }; | 48 }; |
48 | 49 |
49 } // namespace gfx | 50 } // namespace gfx |
50 | 51 |
51 #endif // BASE_GFX_PLATFORM_CANVAS_MAC_H_ | 52 #endif // PlatformCanvasLinux_h |
OLD | NEW |