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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 const SkPaint& paint) SK_OVERRIDE { | 141 const SkPaint& paint) SK_OVERRIDE { |
142 this->addBitmapFromPaint(paint); | 142 this->addBitmapFromPaint(paint); |
143 } | 143 } |
144 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 144 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
145 const SkPoint verts[], const SkPoint texs[], | 145 const SkPoint verts[], const SkPoint texs[], |
146 const SkColor colors[], SkXfermode* xmode, | 146 const SkColor colors[], SkXfermode* xmode, |
147 const uint16_t indices[], int indexCount, | 147 const uint16_t indices[], int indexCount, |
148 const SkPaint& paint) SK_OVERRIDE { | 148 const SkPaint& paint) SK_OVERRIDE { |
149 this->addBitmapFromPaint(paint); | 149 this->addBitmapFromPaint(paint); |
150 } | 150 } |
| 151 virtual void drawPatch(const SkDraw&, const SkPatch& patch, const SkPaint& p
aint) SK_OVERRIDE { |
| 152 //TODO |
| 153 } |
151 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 154 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
152 const SkPaint&) SK_OVERRIDE { | 155 const SkPaint&) SK_OVERRIDE { |
153 nothing_to_do(); | 156 nothing_to_do(); |
154 } | 157 } |
155 | 158 |
156 protected: | 159 protected: |
157 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE { | 160 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE { |
158 not_supported(); | 161 not_supported(); |
159 } | 162 } |
160 virtual SkBaseDevice* onCreateDevice(const SkImageInfo& info, Usage usage) S
K_OVERRIDE { | 163 virtual SkBaseDevice* onCreateDevice(const SkImageInfo& info, Usage usage) S
K_OVERRIDE { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 canvas.clipRect(area, SkRegion::kIntersect_Op, false); | 214 canvas.clipRect(area, SkRegion::kIntersect_Op, false); |
212 canvas.drawPicture(pict); | 215 canvas.drawPicture(pict); |
213 | 216 |
214 SkData* data = NULL; | 217 SkData* data = NULL; |
215 int count = array.count(); | 218 int count = array.count(); |
216 if (count > 0) { | 219 if (count > 0) { |
217 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); | 220 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); |
218 } | 221 } |
219 return data; | 222 return data; |
220 } | 223 } |
OLD | NEW |