| 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 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 SkImag
eFilter::Context&, | 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 | |
| 89 virtual void writePixels(const SkBitmap& bitmap, int x, int y, | |
| 90 SkCanvas::Config8888 config8888) SK_OVERRIDE { | |
| 91 not_supported(); | |
| 92 } | |
| 93 #endif | |
| 94 | |
| 95 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE { | 88 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE { |
| 96 this->addBitmapFromPaint(paint); | 89 this->addBitmapFromPaint(paint); |
| 97 } | 90 } |
| 98 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 91 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
| 99 const SkPoint[], const SkPaint& paint) SK_OVERRIDE { | 92 const SkPoint[], const SkPaint& paint) SK_OVERRIDE { |
| 100 this->addBitmapFromPaint(paint); | 93 this->addBitmapFromPaint(paint); |
| 101 } | 94 } |
| 102 virtual void drawRect(const SkDraw&, const SkRect&, | 95 virtual void drawRect(const SkDraw&, const SkRect&, |
| 103 const SkPaint& paint) SK_OVERRIDE { | 96 const SkPaint& paint) SK_OVERRIDE { |
| 104 this->addBitmapFromPaint(paint); | 97 this->addBitmapFromPaint(paint); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 canvas.clipRect(area, SkRegion::kIntersect_Op, false); | 221 canvas.clipRect(area, SkRegion::kIntersect_Op, false); |
| 229 canvas.drawPicture(*pict); | 222 canvas.drawPicture(*pict); |
| 230 | 223 |
| 231 SkData* data = NULL; | 224 SkData* data = NULL; |
| 232 int count = array.count(); | 225 int count = array.count(); |
| 233 if (count > 0) { | 226 if (count > 0) { |
| 234 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); | 227 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); |
| 235 } | 228 } |
| 236 return data; | 229 return data; |
| 237 } | 230 } |
| OLD | NEW |