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

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

Issue 463493002: SkCanvas::drawPatch param SkPoint[12] (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Removed GPU headers from GM Created 6 years, 4 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 | « include/utils/SkProxyCanvas.h ('k') | src/core/SkBBoxRecord.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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const SkPaint* paint) SK_OVERRIDE; 48 const SkPaint* paint) SK_OVERRIDE;
49 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 49 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
50 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE; 50 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE;
51 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 51 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
52 const SkPaint* paint) SK_OVERRIDE; 52 const SkPaint* paint) SK_OVERRIDE;
53 virtual void drawVertices(VertexMode mode, int vertexCount, 53 virtual void drawVertices(VertexMode mode, int vertexCount,
54 const SkPoint vertices[], const SkPoint texs[], 54 const SkPoint vertices[], const SkPoint texs[],
55 const SkColor colors[], SkXfermode* xfer, 55 const SkColor colors[], SkXfermode* xfer,
56 const uint16_t indices[], int indexCount, 56 const uint16_t indices[], int indexCount,
57 const SkPaint& paint) SK_OVERRIDE; 57 const SkPaint& paint) SK_OVERRIDE;
58 virtual void drawPatch(const SkPatch& patch, const SkPaint& paint) SK_OVERRI DE;
59 58
60 protected: 59 protected:
61 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 60 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
62 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y, 61 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y,
63 const SkPaint&) SK_OVERRIDE; 62 const SkPaint&) SK_OVERRIDE;
64 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[], 63 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[],
65 const SkPaint&) SK_OVERRIDE; 64 const SkPaint&) SK_OVERRIDE;
66 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[], 65 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
67 SkScalar constY, const SkPaint&) SK_OVERRIDE; 66 SkScalar constY, const SkPaint&) SK_OVERRIDE;
68 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 67 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
69 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 68 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
69 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
70 const SkPoint texCoords[4], SkXfermode* xmode,
71 const SkPaint& paint) SK_OVERRIDE;
70 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE; 72 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE;
71 virtual void willSave() SK_OVERRIDE; 73 virtual void willSave() SK_OVERRIDE;
72 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE; 74 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE;
73 virtual void willRestore() SK_OVERRIDE; 75 virtual void willRestore() SK_OVERRIDE;
74 76
75 private: 77 private:
76 /** 78 /**
77 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and 79 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and
78 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox() 80 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox()
79 * returns false if the draw is completely clipped out, and may safely be ig nored. 81 * returns false if the draw is completely clipped out, and may safely be ig nored.
80 **/ 82 **/
81 bool transformBounds(const SkRect& bounds, const SkPaint* paint); 83 bool transformBounds(const SkRect& bounds, const SkPaint* paint);
82 84
83 /** 85 /**
84 * Paints from currently-active saveLayers that need to be applied to boundi ng boxes of all 86 * Paints from currently-active saveLayers that need to be applied to boundi ng boxes of all
85 * primitives drawn inside them. We own these pointers. 87 * primitives drawn inside them. We own these pointers.
86 **/ 88 **/
87 SkTDArray<const SkPaint*> fSaveStack; 89 SkTDArray<const SkPaint*> fSaveStack;
88 90
89 typedef SkPictureRecord INHERITED; 91 typedef SkPictureRecord INHERITED;
90 }; 92 };
91 93
92 #endif 94 #endif
OLDNEW
« no previous file with comments | « include/utils/SkProxyCanvas.h ('k') | src/core/SkBBoxRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698