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

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

Issue 195793012: De-virtualize SkCanvas matrix ops. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 #ifndef SkPictureRecord_DEFINED 8 #ifndef SkPictureRecord_DEFINED
9 #define SkPictureRecord_DEFINED 9 #define SkPictureRecord_DEFINED
10 10
(...skipping 19 matching lines...) Expand all
30 small = (combined >> 24) & 0xFF; \ 30 small = (combined >> 24) & 0xFF; \
31 large = combined & MASK_24; 31 large = combined & MASK_24;
32 #define PACK_8_24(small, large) ((small << 24) | large) 32 #define PACK_8_24(small, large) ((small << 24) | large)
33 33
34 34
35 class SkPictureRecord : public SkCanvas { 35 class SkPictureRecord : public SkCanvas {
36 public: 36 public:
37 SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags); 37 SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags);
38 virtual ~SkPictureRecord(); 38 virtual ~SkPictureRecord();
39 39
40 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
41 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
42 virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
43 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
44 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
45 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
46 virtual void clear(SkColor) SK_OVERRIDE; 40 virtual void clear(SkColor) SK_OVERRIDE;
47 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 41 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
48 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[], 42 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
49 const SkPaint&) SK_OVERRIDE; 43 const SkPaint&) SK_OVERRIDE;
50 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; 44 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
51 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; 45 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
52 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; 46 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
53 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE; 47 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
54 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, 48 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
55 const SkPaint*) SK_OVERRIDE; 49 const SkPaint*) SK_OVERRIDE;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 protected: 216 protected:
223 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; 217 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE;
224 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { 218 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE {
225 return NULL; 219 return NULL;
226 } 220 }
227 221
228 virtual void willSave(SaveFlags) SK_OVERRIDE; 222 virtual void willSave(SaveFlags) SK_OVERRIDE;
229 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE; 223 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE;
230 virtual void willRestore() SK_OVERRIDE; 224 virtual void willRestore() SK_OVERRIDE;
231 225
226 virtual void didTranslate(SkScalar, SkScalar) SK_OVERRIDE;
227 virtual void didScale(SkScalar, SkScalar) SK_OVERRIDE;
228 virtual void didRotate(SkScalar) SK_OVERRIDE;
229 virtual void didSkew(SkScalar, SkScalar) SK_OVERRIDE;
230 virtual void didConcat(const SkMatrix&) SK_OVERRIDE;
231 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE;
232
232 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 233 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
233 virtual void onPushCull(const SkRect&) SK_OVERRIDE; 234 virtual void onPushCull(const SkRect&) SK_OVERRIDE;
234 virtual void onPopCull() SK_OVERRIDE; 235 virtual void onPopCull() SK_OVERRIDE;
235 236
236 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 237 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
237 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 238 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
238 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 239 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
239 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 240 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
240 241
241 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been 242 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 friend class SkPictureTester; // for unit testing 306 friend class SkPictureTester; // for unit testing
306 307
307 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE 308 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
308 SkMatrixClipStateMgr fMCMgr; 309 SkMatrixClipStateMgr fMCMgr;
309 #endif 310 #endif
310 311
311 typedef SkCanvas INHERITED; 312 typedef SkCanvas INHERITED;
312 }; 313 };
313 314
314 #endif 315 #endif
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698