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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // of the device are initialized to 0. | 82 // of the device are initialized to 0. |
83 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, | 83 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, |
84 uint8_t* data); | 84 uint8_t* data); |
85 | 85 |
86 // Overridden from SkBaseDevice: | 86 // Overridden from SkBaseDevice: |
87 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, | 87 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, |
88 const SkClipStack&) override; | 88 const SkClipStack&) override; |
89 | 89 |
90 // Overridden from PlatformDevice: | 90 // Overridden from PlatformDevice: |
91 virtual cairo_t* BeginPlatformPaint() override; | 91 virtual cairo_t* BeginPlatformPaint() override; |
92 virtual void DrawToNativeContext(PlatformSurface surface, int x, int y, | |
93 const PlatformRect* src_rect) override; | |
94 | 92 |
95 protected: | 93 protected: |
96 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) | 94 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) |
97 override; | 95 override; |
98 | 96 |
99 private: | 97 private: |
100 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, | 98 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque, |
101 cairo_surface_t* surface); | 99 cairo_surface_t* surface); |
102 | 100 |
103 // 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 |
(...skipping 19 matching lines...) Expand all Loading... |
123 | 121 |
124 // The current clipping | 122 // The current clipping |
125 SkRegion clip_region_; | 123 SkRegion clip_region_; |
126 | 124 |
127 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); | 125 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); |
128 }; | 126 }; |
129 | 127 |
130 } // namespace skia | 128 } // namespace skia |
131 | 129 |
132 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_ | 130 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_ |
OLD | NEW |