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

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

Issue 448793004: add drawPicture variant that takes a matrix and paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more dummies so we can land 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 | « src/core/SkPicturePlayback.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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[], 254 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
255 SkScalar constY, const SkPaint&) SK_OVERRIDE; 255 SkScalar constY, const SkPaint&) SK_OVERRIDE;
256 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 256 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
257 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 257 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
258 258
259 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 259 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
260 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 260 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
261 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 261 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
262 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 262 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
263 263
264 virtual void onDrawPicture(const SkPicture* picture) SK_OVERRIDE; 264 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE;
265 265
266 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been 266 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been
267 // tweaked by paint.computeFastBounds(). 267 // tweaked by paint.computeFastBounds().
268 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo t[2]); 268 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo t[2]);
269 269
270 // Make sure that flat has fTopBot written. 270 // Make sure that flat has fTopBot written.
271 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) { 271 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) {
272 if (!flat.isTopBotWritten()) { 272 if (!flat.isTopBotWritten()) {
273 ComputeFontMetricsTopBottom(paint, flat.writableTopBot()); 273 ComputeFontMetricsTopBottom(paint, flat.writableTopBot());
274 SkASSERT(flat.isTopBotWritten()); 274 SkASSERT(flat.isTopBotWritten());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 friend class SkPictureTester; // for unit testing 332 friend class SkPictureTester; // for unit testing
333 333
334 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE 334 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
335 SkMatrixClipStateMgr fMCMgr; 335 SkMatrixClipStateMgr fMCMgr;
336 #endif 336 #endif
337 337
338 typedef SkCanvas INHERITED; 338 typedef SkCanvas INHERITED;
339 }; 339 };
340 340
341 #endif 341 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698