OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkData.h" | 10 #include "SkData.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal
se; } | 78 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal
se; } |
79 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return
false; } | 79 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return
false; } |
80 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, | 80 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, |
81 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { | 81 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { |
82 return false; | 82 return false; |
83 } | 83 } |
84 | 84 |
85 virtual void clear(SkColor color) SK_OVERRIDE { | 85 virtual void clear(SkColor color) SK_OVERRIDE { |
86 nothing_to_do(); | 86 nothing_to_do(); |
87 } | 87 } |
| 88 |
| 89 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG |
88 virtual void writePixels(const SkBitmap& bitmap, int x, int y, | 90 virtual void writePixels(const SkBitmap& bitmap, int x, int y, |
89 SkCanvas::Config8888 config8888) SK_OVERRIDE { | 91 SkCanvas::Config8888 config8888) SK_OVERRIDE { |
90 not_supported(); | 92 not_supported(); |
91 } | 93 } |
| 94 #endif |
92 | 95 |
93 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE { | 96 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE { |
94 this->addBitmapFromPaint(paint); | 97 this->addBitmapFromPaint(paint); |
95 } | 98 } |
96 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 99 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
97 const SkPoint[], const SkPaint& paint) SK_OVERRIDE { | 100 const SkPoint[], const SkPaint& paint) SK_OVERRIDE { |
98 this->addBitmapFromPaint(paint); | 101 this->addBitmapFromPaint(paint); |
99 } | 102 } |
100 virtual void drawRect(const SkDraw&, const SkRect&, | 103 virtual void drawRect(const SkDraw&, const SkRect&, |
101 const SkPaint& paint) SK_OVERRIDE { | 104 const SkPaint& paint) SK_OVERRIDE { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 canvas.clipRect(area, SkRegion::kIntersect_Op, false); | 229 canvas.clipRect(area, SkRegion::kIntersect_Op, false); |
227 canvas.drawPicture(*pict); | 230 canvas.drawPicture(*pict); |
228 | 231 |
229 SkData* data = NULL; | 232 SkData* data = NULL; |
230 int count = array.count(); | 233 int count = array.count(); |
231 if (count > 0) { | 234 if (count > 0) { |
232 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); | 235 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); |
233 } | 236 } |
234 return data; | 237 return data; |
235 } | 238 } |
OLD | NEW |