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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return false; | 69 return false; |
70 } | 70 } |
71 // TODO: allow this call to return failure, or move to SkBitmapDevice only. | 71 // TODO: allow this call to return failure, or move to SkBitmapDevice only. |
72 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE { | 72 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE { |
73 return fEmptyBitmap; | 73 return fEmptyBitmap; |
74 } | 74 } |
75 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); } | 75 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); } |
76 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); } | 76 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); } |
77 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal
se; } | 77 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal
se; } |
78 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return
false; } | 78 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return
false; } |
79 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, | 79 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImag
eFilter::Context&, |
80 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { | 80 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { |
81 return false; | 81 return false; |
82 } | 82 } |
83 | 83 |
84 virtual void clear(SkColor color) SK_OVERRIDE { | 84 virtual void clear(SkColor color) SK_OVERRIDE { |
85 nothing_to_do(); | 85 nothing_to_do(); |
86 } | 86 } |
87 | 87 |
88 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG | 88 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG |
89 virtual void writePixels(const SkBitmap& bitmap, int x, int y, | 89 virtual void writePixels(const SkBitmap& bitmap, int x, int y, |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 canvas.clipRect(area, SkRegion::kIntersect_Op, false); | 228 canvas.clipRect(area, SkRegion::kIntersect_Op, false); |
229 canvas.drawPicture(*pict); | 229 canvas.drawPicture(*pict); |
230 | 230 |
231 SkData* data = NULL; | 231 SkData* data = NULL; |
232 int count = array.count(); | 232 int count = array.count(); |
233 if (count > 0) { | 233 if (count > 0) { |
234 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); | 234 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); |
235 } | 235 } |
236 return data; | 236 return data; |
237 } | 237 } |
OLD | NEW |