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

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

Issue 1424553002: SkRecord refactor: fill bounds array instead of BBH directly (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/SkPictureRecorder.cpp ('k') | src/core/SkRecordDraw.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 2014 Google Inc. 2 * Copyright 2014 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 SkRecordDraw_DEFINED 8 #ifndef SkRecordDraw_DEFINED
9 #define SkRecordDraw_DEFINED 9 #define SkRecordDraw_DEFINED
10 10
11 #include "SkBBoxHierarchy.h" 11 #include "SkBBoxHierarchy.h"
12 #include "SkBigPicture.h" 12 #include "SkBigPicture.h"
13 #include "SkCanvas.h" 13 #include "SkCanvas.h"
14 #include "SkMatrix.h" 14 #include "SkMatrix.h"
15 #include "SkRecord.h" 15 #include "SkRecord.h"
16 16
17 class SkDrawable; 17 class SkDrawable;
18 class SkLayerInfo; 18 class SkLayerInfo;
19 19
20 // Fill a BBH to be used by SkRecordDraw to accelerate playback. 20 // Calculate conservative identity space bounds for each op in the record.
21 void SkRecordFillBounds(const SkRect& cullRect, const SkRecord&, SkBBoxHierarchy *); 21 void SkRecordFillBounds(const SkRect& cullRect, const SkRecord&, SkRect bounds[] );
22 22
robertphillips 2015/10/23 19:07:07 Maybe: This code gathers information about saveLay
mtklein_C 2015/10/23 19:09:49 Done.
23 void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, 23 // SkRecordFillBounds(), and more! (Perhaps Robert could fill in here...)
24 const SkBigPicture::SnapshotArray*, 24 void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord&, SkRect bound s[],
25 SkBBoxHierarchy* bbh, SkLayerInfo* data); 25 const SkBigPicture::SnapshotArray*, SkLayerInfo* data );
26 26
27 // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::D raw. 27 // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::D raw.
28 void SkRecordDraw(const SkRecord&, SkCanvas*, SkPicture const* const drawablePic ts[], 28 void SkRecordDraw(const SkRecord&, SkCanvas*, SkPicture const* const drawablePic ts[],
29 SkDrawable* const drawables[], int drawableCount, 29 SkDrawable* const drawables[], int drawableCount,
30 const SkBBoxHierarchy*, SkPicture::AbortCallback*); 30 const SkBBoxHierarchy*, SkPicture::AbortCallback*);
31 31
32 // Draw a portion of an SkRecord into an SkCanvas. 32 // Draw a portion of an SkRecord into an SkCanvas.
33 // When drawing a portion of an SkRecord the CTM on the passed in canvas must be 33 // When drawing a portion of an SkRecord the CTM on the passed in canvas must be
34 // the composition of the replay matrix with the record-time CTM (for the portio n 34 // the composition of the replay matrix with the record-time CTM (for the portio n
35 // of the record that is being replayed). For setMatrix calls to behave correctl y 35 // of the record that is being replayed). For setMatrix calls to behave correctl y
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const SkMatrix fInitialCTM; 71 const SkMatrix fInitialCTM;
72 SkCanvas* fCanvas; 72 SkCanvas* fCanvas;
73 SkPicture const* const* fDrawablePicts; 73 SkPicture const* const* fDrawablePicts;
74 SkDrawable* const* fDrawables; 74 SkDrawable* const* fDrawables;
75 int fDrawableCount; 75 int fDrawableCount;
76 }; 76 };
77 77
78 } // namespace SkRecords 78 } // namespace SkRecords
79 79
80 #endif//SkRecordDraw_DEFINED 80 #endif//SkRecordDraw_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkPictureRecorder.cpp ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698