OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CAIRO_H_ | 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_ |
6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_ | 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Overridden from SkBaseDevice: | 86 // Overridden from SkBaseDevice: |
87 void setMatrixClip(const SkMatrix& transform, | 87 void setMatrixClip(const SkMatrix& transform, |
88 const SkRegion& region, | 88 const SkRegion& region, |
89 const SkClipStack&) override; | 89 const SkClipStack&) override; |
90 | 90 |
91 // Overridden from PlatformDevice: | 91 // Overridden from PlatformDevice: |
92 cairo_t* BeginPlatformPaint() override; | 92 cairo_t* BeginPlatformPaint() override; |
93 | 93 |
94 protected: | 94 protected: |
95 SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) override; | 95 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; |
96 | 96 |
97 private: | 97 private: |
98 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, | 98 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, |
99 cairo_surface_t* surface); | 99 cairo_surface_t* surface); |
100 | 100 |
101 // Sets the transform and clip operations. This will not update the Cairo | 101 // Sets the transform and clip operations. This will not update the Cairo |
102 // context, but will mark the config as dirty. The next call of LoadConfig | 102 // context, but will mark the config as dirty. The next call of LoadConfig |
103 // will pick up these changes. | 103 // will pick up these changes. |
104 void SetMatrixClip(const SkMatrix& transform, const SkRegion& region); | 104 void SetMatrixClip(const SkMatrix& transform, const SkRegion& region); |
105 | 105 |
(...skipping 15 matching lines...) Expand all Loading... |
121 | 121 |
122 // The current clipping | 122 // The current clipping |
123 SkRegion clip_region_; | 123 SkRegion clip_region_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); | 125 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace skia | 128 } // namespace skia |
129 | 129 |
130 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_ | 130 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_ |
OLD | NEW |