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

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

Issue 736583004: allow pictures to have a full bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use new roundOut Created 6 years, 1 month 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 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 SkRecorder_DEFINED 8 #ifndef SkRecorder_DEFINED
9 #define SkRecorder_DEFINED 9 #define SkRecorder_DEFINED
10 10
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkRecord.h" 12 #include "SkRecord.h"
13 #include "SkRecords.h" 13 #include "SkRecords.h"
14 #include "SkTDArray.h" 14 #include "SkTDArray.h"
15 15
16 // SkRecorder provides an SkCanvas interface for recording into an SkRecord. 16 // SkRecorder provides an SkCanvas interface for recording into an SkRecord.
17 17
18 class SkRecorder : public SkCanvas { 18 class SkRecorder : public SkCanvas {
19 public: 19 public:
20 // Does not take ownership of the SkRecord. 20 // Does not take ownership of the SkRecord.
21 SkRecorder(SkRecord*, int width, int height); 21 SkRecorder(SkRecord*, int width, int height); // legacy version
22 SkRecorder(SkRecord*, const SkRect& bounds);
22 virtual ~SkRecorder() SK_OVERRIDE; 23 virtual ~SkRecorder() SK_OVERRIDE;
23 24
24 // return a (new or ref'd) data containing the array of pictures that were 25 // return a (new or ref'd) data containing the array of pictures that were
25 // snapped from our drawables. 26 // snapped from our drawables.
26 SkData* newDrawableSnapshot(SkBBHFactory*, uint32_t recordFlags); 27 SkData* newDrawableSnapshot(SkBBHFactory*, uint32_t recordFlags);
27 28
28 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor der will fail. 29 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor der will fail.
29 void forgetRecord(); 30 void forgetRecord();
30 31
31 void clear(SkColor) SK_OVERRIDE; 32 void clear(SkColor) SK_OVERRIDE;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 143 }
143 144
144 SkRecord* fRecord; 145 SkRecord* fRecord;
145 146
146 int fSaveLayerCount; 147 int fSaveLayerCount;
147 SkTDArray<SkBool8> fSaveIsSaveLayer; 148 SkTDArray<SkBool8> fSaveIsSaveLayer;
148 SkTDArray<SkCanvasDrawable*> fDrawableList; 149 SkTDArray<SkCanvasDrawable*> fDrawableList;
149 }; 150 };
150 151
151 #endif//SkRecorder_DEFINED 152 #endif//SkRecorder_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698