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

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: pass paint to transformBounds in bbox 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
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[], 253 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
254 SkScalar constY, const SkPaint&) SK_OVERRIDE; 254 SkScalar constY, const SkPaint&) SK_OVERRIDE;
255 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 255 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
256 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 256 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
257 257
258 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 258 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
259 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 259 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
260 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 260 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
261 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 261 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
262 262
263 virtual void onDrawPicture(const SkPicture* picture) SK_OVERRIDE; 263 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE;
264 264
265 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been 265 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been
266 // tweaked by paint.computeFastBounds(). 266 // tweaked by paint.computeFastBounds().
267 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo t[2]); 267 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo t[2]);
268 268
269 // Make sure that flat has fTopBot written. 269 // Make sure that flat has fTopBot written.
270 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) { 270 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) {
271 if (!flat.isTopBotWritten()) { 271 if (!flat.isTopBotWritten()) {
272 ComputeFontMetricsTopBottom(paint, flat.writableTopBot()); 272 ComputeFontMetricsTopBottom(paint, flat.writableTopBot());
273 SkASSERT(flat.isTopBotWritten()); 273 SkASSERT(flat.isTopBotWritten());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 friend class SkPictureTester; // for unit testing 331 friend class SkPictureTester; // for unit testing
332 332
333 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE 333 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
334 SkMatrixClipStateMgr fMCMgr; 334 SkMatrixClipStateMgr fMCMgr;
335 #endif 335 #endif
336 336
337 typedef SkCanvas INHERITED; 337 typedef SkCanvas INHERITED;
338 }; 338 };
339 339
340 #endif 340 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698