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

Side by Side Diff: src/core/SkBBoxRecord.h

Issue 313613004: Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add staging entry point for Chromium and Android Created 6 years, 6 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 #ifndef SkBBoxRecord_DEFINED 9 #ifndef SkBBoxRecord_DEFINED
10 #define SkBBoxRecord_DEFINED 10 #define SkBBoxRecord_DEFINED
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const SkPaint* paint) SK_OVERRIDE; 47 const SkPaint* paint) SK_OVERRIDE;
48 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 48 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
49 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE; 49 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE;
50 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 50 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
51 const SkPaint* paint) SK_OVERRIDE; 51 const SkPaint* paint) SK_OVERRIDE;
52 virtual void drawVertices(VertexMode mode, int vertexCount, 52 virtual void drawVertices(VertexMode mode, int vertexCount,
53 const SkPoint vertices[], const SkPoint texs[], 53 const SkPoint vertices[], const SkPoint texs[],
54 const SkColor colors[], SkXfermode* xfer, 54 const SkColor colors[], SkXfermode* xfer,
55 const uint16_t indices[], int indexCount, 55 const uint16_t indices[], int indexCount,
56 const SkPaint& paint) SK_OVERRIDE; 56 const SkPaint& paint) SK_OVERRIDE;
57 virtual void drawPicture(SkPicture& picture) SK_OVERRIDE;
58 57
59 protected: 58 protected:
60 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 59 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
61 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y, 60 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y,
62 const SkPaint&) SK_OVERRIDE; 61 const SkPaint&) SK_OVERRIDE;
63 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[], 62 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[],
64 const SkPaint&) SK_OVERRIDE; 63 const SkPaint&) SK_OVERRIDE;
65 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[], 64 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
66 SkScalar constY, const SkPaint&) SK_OVERRIDE; 65 SkScalar constY, const SkPaint&) SK_OVERRIDE;
67 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 66 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
68 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 67 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
68 virtual void onDrawPicture(const SkPicture* picture) SK_OVERRIDE;
69 69
70 private: 70 private:
71 /** 71 /**
72 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and 72 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and
73 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox() 73 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox()
74 * returns false if the draw is completely clipped out, and may safely be ig nored. 74 * returns false if the draw is completely clipped out, and may safely be ig nored.
75 **/ 75 **/
76 bool transformBounds(const SkRect& bounds, const SkPaint* paint); 76 bool transformBounds(const SkRect& bounds, const SkPaint* paint);
77 77
78 typedef SkPictureRecord INHERITED; 78 typedef SkPictureRecord INHERITED;
79 }; 79 };
80 80
81 #endif 81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698