OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ | 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ |
6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ | 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "skia/ext/platform_device_linux.h" | 10 #include "skia/ext/platform_device_linux.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // the Windows and Mac versions of this class do. | 72 // the Windows and Mac versions of this class do. |
73 // | 73 // |
74 // This object takes ownership of @data. | 74 // This object takes ownership of @data. |
75 BitmapPlatformDevice(const SkBitmap& other, BitmapPlatformDeviceData* data); | 75 BitmapPlatformDevice(const SkBitmap& other, BitmapPlatformDeviceData* data); |
76 virtual ~BitmapPlatformDevice(); | 76 virtual ~BitmapPlatformDevice(); |
77 BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other); | 77 BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other); |
78 | 78 |
79 // A stub copy constructor. Needs to be properly implemented. | 79 // A stub copy constructor. Needs to be properly implemented. |
80 BitmapPlatformDevice(const BitmapPlatformDevice& other); | 80 BitmapPlatformDevice(const BitmapPlatformDevice& other); |
81 | 81 |
| 82 virtual void makeOpaque(int x, int y, int width, int height); |
| 83 |
82 // Bitmaps aren't vector graphics. | 84 // Bitmaps aren't vector graphics. |
83 virtual bool IsVectorial() { return false; } | 85 virtual bool IsVectorial() { return false; } |
84 | 86 |
85 // If someone wants to paint on a Cairo surface version of our | 87 // If someone wants to paint on a Cairo surface version of our |
86 // buffer, then give them the surface we're already using. | 88 // buffer, then give them the surface we're already using. |
87 virtual cairo_t* beginPlatformPaint(); | 89 virtual cairo_t* beginPlatformPaint(); |
88 | 90 |
89 // Loads the given transform and clipping region into the HDC. This is | 91 // Loads the given transform and clipping region into the HDC. This is |
90 // overridden from SkDevice. | 92 // overridden from SkDevice. |
91 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region); | 93 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region); |
92 | 94 |
93 private: | 95 private: |
94 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, | 96 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, |
95 cairo_surface_t* surface); | 97 cairo_surface_t* surface); |
96 | 98 |
97 scoped_refptr<BitmapPlatformDeviceData> data_; | 99 scoped_refptr<BitmapPlatformDeviceData> data_; |
98 }; | 100 }; |
99 | 101 |
100 } // namespace skia | 102 } // namespace skia |
101 | 103 |
102 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ | 104 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ |
OLD | NEW |