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 BASE_GFX_PLATFORM_CANVAS_LINUX_H_ |
6 #define BASE_GFX_PLATFORM_CANVAS_LINUX_H_ | 6 #define BASE_GFX_PLATFORM_CANVAS_LINUX_H_ |
7 | 7 |
8 #include "base/gfx/platform_device_linux.h" | 8 #include "base/gfx/platform_device_linux.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Returns the platform device pointer of the topmost rect with a non-empty | 30 // Returns the platform device pointer of the topmost rect with a non-empty |
31 // clip. Both the windows and mac versions have an equivalent of this method; | 31 // clip. Both the windows and mac versions have an equivalent of this method; |
32 // a Linux version is added for compatibility. | 32 // a Linux version is added for compatibility. |
33 PlatformDeviceLinux& getTopPlatformDevice() const; | 33 PlatformDeviceLinux& getTopPlatformDevice() const; |
34 | 34 |
35 protected: | 35 protected: |
36 // Creates a device store for use by the canvas. We override this so that | 36 // 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 | 37 // the device is always our own so we know that we can use GDI operations |
38 // on it. Simply calls into createPlatformDevice(). | 38 // on it. Simply calls into createPlatformDevice(). |
39 virtual SkDevice* createDevice(SkBitmap::Config, int width, int height, | 39 virtual SkDevice* createDevice(SkBitmap::Config, int width, int height, |
40 bool is_opaque); | 40 bool is_opaque, bool isForLayer); |
41 | 41 |
42 // Creates a device store for use by the canvas. By default, it creates a | 42 // 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. | 43 // BitmapPlatformDevice object. Can be overridden to change the object type. |
44 virtual SkDevice* createPlatformDevice(int width, int height, bool is_opaque); | 44 virtual SkDevice* createPlatformDevice(int width, int height, bool is_opaque); |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(PlatformCanvasLinux); | 46 DISALLOW_COPY_AND_ASSIGN(PlatformCanvasLinux); |
47 }; | 47 }; |
48 | 48 |
49 } // namespace gfx | 49 } // namespace gfx |
50 | 50 |
51 #endif // BASE_GFX_PLATFORM_CANVAS_MAC_H_ | 51 #endif // BASE_GFX_PLATFORM_CANVAS_MAC_H_ |
OLD | NEW |