Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/pipe/SkGPipeWrite.cpp

Issue 499413002: SkTextBlob plumbing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pipe/SkGPipeRead.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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* blob, SkScalar x, SkScalar y,
287 const SkPaint& paint) SK_OVERRIDE;
286 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], 288 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
287 const SkPoint texCoords[4], SkXfermode* xmode, 289 const SkPoint texCoords[4], SkXfermode* xmode,
288 const SkPaint& paint) SK_OVERRIDE; 290 const SkPaint& paint) SK_OVERRIDE;
289 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 291 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
290 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 292 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
291 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 293 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
292 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 294 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
293 295
294 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE; 296 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE;
295 297
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 fWriter.writePad(text, byteLength); 930 fWriter.writePad(text, byteLength);
929 931
930 fWriter.writePath(path); 932 fWriter.writePath(path);
931 if (matrix) { 933 if (matrix) {
932 fWriter.writeMatrix(*matrix); 934 fWriter.writeMatrix(*matrix);
933 } 935 }
934 } 936 }
935 } 937 }
936 } 938 }
937 939
940 void SkGPipeCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
941 const SkPaint& paint) {
942 // FIXME: blob serialization only supports SkWriteBuffers
943 // -- convert to SkWriter32 to avoid unrolling?
944 this->INHERITED::onDrawTextBlob(blob, x, y, paint);
945 }
946
938 void SkGPipeCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr ix, 947 void SkGPipeCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr ix,
939 const SkPaint* paint) { 948 const SkPaint* paint) {
940 // we want to playback the picture into individual draw calls 949 // we want to playback the picture into individual draw calls
941 // 950 //
942 // todo: do we always have to unroll? If the pipe is not cross-process, seem s like 951 // 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> 952 // we could just ref the picture and move on...? <reed, scroggo>
944 // 953 //
945 this->INHERITED::onDrawPicture(picture, matrix, paint); 954 this->INHERITED::onDrawPicture(picture, matrix, paint);
946 } 955 }
947 956
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 return fCanvas->shuttleBitmap(bitmap, slot); 1322 return fCanvas->shuttleBitmap(bitmap, slot);
1314 } 1323 }
1315 1324
1316 void BitmapShuttle::removeCanvas() { 1325 void BitmapShuttle::removeCanvas() {
1317 if (NULL == fCanvas) { 1326 if (NULL == fCanvas) {
1318 return; 1327 return;
1319 } 1328 }
1320 fCanvas->unref(); 1329 fCanvas->unref();
1321 fCanvas = NULL; 1330 fCanvas = NULL;
1322 } 1331 }
OLDNEW
« no previous file with comments | « src/pipe/SkGPipeRead.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698