| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "SkAnnotation.h" | 9 #include "SkAnnotation.h" |
| 10 #include "SkBitmapDevice.h" | 10 #include "SkBitmapDevice.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 277 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
| 278 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, | 278 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, |
| 279 const SkPaint&) SK_OVERRIDE; | 279 const SkPaint&) SK_OVERRIDE; |
| 280 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], | 280 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], |
| 281 const SkPaint&) SK_OVERRIDE; | 281 const SkPaint&) SK_OVERRIDE; |
| 282 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 282 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
| 283 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 283 SkScalar constY, const SkPaint&) SK_OVERRIDE; |
| 284 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 284 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
| 285 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 285 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; |
| 286 virtual void onDrawTextBlob(const SkTextBlob*, const SkPoint&, const SkPaint
&) SK_OVERRIDE; |
| 286 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 287 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
| 287 const SkPoint texCoords[4], SkXfermode* xmode, | 288 const SkPoint texCoords[4], SkXfermode* xmode, |
| 288 const SkPaint& paint) SK_OVERRIDE; | 289 const SkPaint& paint) SK_OVERRIDE; |
| 289 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 290 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 290 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 291 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
| 291 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 292 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 292 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 293 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
| 293 | 294 |
| 294 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; | 295 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; |
| 295 | 296 |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 fWriter.writePad(text, byteLength); | 929 fWriter.writePad(text, byteLength); |
| 929 | 930 |
| 930 fWriter.writePath(path); | 931 fWriter.writePath(path); |
| 931 if (matrix) { | 932 if (matrix) { |
| 932 fWriter.writeMatrix(*matrix); | 933 fWriter.writeMatrix(*matrix); |
| 933 } | 934 } |
| 934 } | 935 } |
| 935 } | 936 } |
| 936 } | 937 } |
| 937 | 938 |
| 939 void SkGPipeCanvas::onDrawTextBlob(const SkTextBlob* blob, const SkPoint& offset
, |
| 940 const SkPaint& paint) { |
| 941 // FIXME: impl |
| 942 this->INHERITED::onDrawTextBlob(blob, offset, paint); |
| 943 } |
| 944 |
| 938 void SkGPipeCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr
ix, | 945 void SkGPipeCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr
ix, |
| 939 const SkPaint* paint) { | 946 const SkPaint* paint) { |
| 940 // we want to playback the picture into individual draw calls | 947 // we want to playback the picture into individual draw calls |
| 941 // | 948 // |
| 942 // todo: do we always have to unroll? If the pipe is not cross-process, seem
s like | 949 // todo: do we always have to unroll? If the pipe is not cross-process, seem
s like |
| 943 // we could just ref the picture and move on...? <reed, scroggo> | 950 // we could just ref the picture and move on...? <reed, scroggo> |
| 944 // | 951 // |
| 945 this->INHERITED::onDrawPicture(picture, matrix, paint); | 952 this->INHERITED::onDrawPicture(picture, matrix, paint); |
| 946 } | 953 } |
| 947 | 954 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 return fCanvas->shuttleBitmap(bitmap, slot); | 1320 return fCanvas->shuttleBitmap(bitmap, slot); |
| 1314 } | 1321 } |
| 1315 | 1322 |
| 1316 void BitmapShuttle::removeCanvas() { | 1323 void BitmapShuttle::removeCanvas() { |
| 1317 if (NULL == fCanvas) { | 1324 if (NULL == fCanvas) { |
| 1318 return; | 1325 return; |
| 1319 } | 1326 } |
| 1320 fCanvas->unref(); | 1327 fCanvas->unref(); |
| 1321 fCanvas = NULL; | 1328 fCanvas = NULL; |
| 1322 } | 1329 } |
| OLD | NEW |