OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkBitmapDevice_DEFINED | 9 #ifndef SkBitmapDevice_DEFINED |
10 #define SkBitmapDevice_DEFINED | 10 #define SkBitmapDevice_DEFINED |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 /** | 52 /** |
53 * Construct a new device with the specified bitmap as its backend. It is | 53 * Construct a new device with the specified bitmap as its backend. It is |
54 * valid for the bitmap to have no pixels associated with it. In that case, | 54 * valid for the bitmap to have no pixels associated with it. In that case, |
55 * any drawing to this device will have no effect. | 55 * any drawing to this device will have no effect. |
56 */ | 56 */ |
57 SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps); | 57 SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps); |
58 | 58 |
59 static SkBitmapDevice* Create(const SkImageInfo&, const SkSurfaceProps&); | 59 static SkBitmapDevice* Create(const SkImageInfo&, const SkSurfaceProps&); |
60 | 60 |
61 SkImageInfo imageInfo() const override; | |
62 | |
63 protected: | 61 protected: |
64 bool onShouldDisableLCD(const SkPaint&) const override; | 62 bool onShouldDisableLCD(const SkPaint&) const override; |
65 | 63 |
66 /** These are called inside the per-device-layer loop for each draw call. | 64 /** These are called inside the per-device-layer loop for each draw call. |
67 When these are called, we have already applied any saveLayer operations, | 65 When these are called, we have already applied any saveLayer operations, |
68 and are handling any looping from the paint, and any effects from the | 66 and are handling any looping from the paint, and any effects from the |
69 DrawFilter. | 67 DrawFilter. |
70 */ | 68 */ |
71 void drawPaint(const SkDraw&, const SkPaint& paint) override; | 69 void drawPaint(const SkDraw&, const SkPaint& paint) override; |
72 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 70 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 SkImageFilterCache* getImageFilterCache() override; | 172 SkImageFilterCache* getImageFilterCache() override; |
175 | 173 |
176 SkBitmap fBitmap; | 174 SkBitmap fBitmap; |
177 | 175 |
178 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). | 176 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). |
179 | 177 |
180 typedef SkBaseDevice INHERITED; | 178 typedef SkBaseDevice INHERITED; |
181 }; | 179 }; |
182 | 180 |
183 #endif // SkBitmapDevice_DEFINED | 181 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |