OLD | NEW |
---|---|
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 SkPictureRecorder_DEFINED | 8 #ifndef SkPictureRecorder_DEFINED |
9 #define SkPictureRecorder_DEFINED | 9 #define SkPictureRecorder_DEFINED |
10 | 10 |
11 #include "SkBBHFactory.h" | 11 #include "SkBBHFactory.h" |
12 #include "SkPicture.h" | 12 #include "SkPicture.h" |
13 #include "SkRefCnt.h" | 13 #include "SkRefCnt.h" |
14 | 14 |
15 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | |
16 namespace android { | |
17 class Picture; | |
18 }; | |
19 #endif | |
20 | |
15 class SkCanvas; | 21 class SkCanvas; |
16 class SkPictureRecord; | 22 class SkPictureRecord; |
17 class SkRecord; | 23 class SkRecord; |
18 class SkRecorder; | 24 class SkRecorder; |
19 | 25 |
20 class SK_API SkPictureRecorder : SkNoncopyable { | 26 class SK_API SkPictureRecorder : SkNoncopyable { |
21 public: | 27 public: |
22 SkPictureRecorder() : fPictureRecord(NULL), fRecorder(NULL), fRecord(NULL) { } | 28 SkPictureRecorder() : fPictureRecord(NULL), fRecorder(NULL), fRecord(NULL) { } |
23 ~SkPictureRecorder(); | 29 ~SkPictureRecorder(); |
24 | 30 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 after 'beginRecording'. | 64 after 'beginRecording'. |
59 */ | 65 */ |
60 void internalOnly_EnableOpts(bool enableOpts); | 66 void internalOnly_EnableOpts(bool enableOpts); |
61 | 67 |
62 private: | 68 private: |
63 void reset(); | 69 void reset(); |
64 | 70 |
65 /** Replay the current (partially recorded) operation stream into | 71 /** Replay the current (partially recorded) operation stream into |
66 canvas. This call doesn't close the current recording. | 72 canvas. This call doesn't close the current recording. |
67 */ | 73 */ |
68 friend class AndroidPicture; | 74 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
robertphillips
2014/06/23 15:21:15
Can we get rid of AndroidPicture now?
| |
75 friend class AndroidPicture; // This is temporary until we remove this from the framework | |
76 friend class android::Picture; | |
77 #endif | |
69 friend class SkPictureRecorderReplayTester; // for unit testing | 78 friend class SkPictureRecorderReplayTester; // for unit testing |
70 void partialReplay(SkCanvas* canvas) const; | 79 void partialReplay(SkCanvas* canvas) const; |
71 | 80 |
72 int fWidth; | 81 int fWidth; |
73 int fHeight; | 82 int fHeight; |
74 | 83 |
75 // Both ref counted. One of these two will be non-null: | 84 // Both ref counted. One of these two will be non-null: |
76 SkPictureRecord* fPictureRecord; // beginRecording() | 85 SkPictureRecord* fPictureRecord; // beginRecording() |
77 SkRecorder* fRecorder; // EXPERIMENTAL_beginRecording() | 86 SkRecorder* fRecorder; // EXPERIMENTAL_beginRecording() |
78 | 87 |
79 // Not refcounted. Used by EXPERIMENTAL_beginRecording(). | 88 // Not refcounted. Used by EXPERIMENTAL_beginRecording(). |
80 SkRecord* fRecord; | 89 SkRecord* fRecord; |
81 | 90 |
82 typedef SkNoncopyable INHERITED; | 91 typedef SkNoncopyable INHERITED; |
83 }; | 92 }; |
84 | 93 |
85 #endif | 94 #endif |
OLD | NEW |