blob: 2ea94c7086052bce684a7736691aab40c30ffa18 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
reed@android.com8a1c16f2008-12-17 15:59:43 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * Copyright 2007 The Android Open Source Project
reed@android.com8a1c16f2008-12-17 15:59:43 +00004 *
epoger@google.comec3ed6a2011-07-28 14:26:00 +00005 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
reed@android.com8a1c16f2008-12-17 15:59:43 +00007 */
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
reed@android.com8a1c16f2008-12-17 15:59:43 +000010#ifndef SkPicture_DEFINED
11#define SkPicture_DEFINED
12
scroggo@google.comf8d7d272013-02-22 21:38:35 +000013#include "SkBitmap.h"
Mike Kleinc11530e2014-06-24 11:29:06 -040014#include "SkDrawPictureCallback.h"
scroggo@google.comf1754ec2013-06-28 21:32:00 +000015#include "SkImageDecoder.h"
reed@android.com8a1c16f2008-12-17 15:59:43 +000016#include "SkRefCnt.h"
robertphillips3afef1f2014-07-08 06:12:22 -070017#include "SkTDArray.h"
reed@android.com8a1c16f2008-12-17 15:59:43 +000018
commit-bot@chromium.orgeb9547c2014-03-19 21:24:25 +000019#if SK_SUPPORT_GPU
20class GrContext;
21#endif
22
junov@chromium.org35ac0482012-11-01 17:10:32 +000023class SkBBoxHierarchy;
reed@android.com8a1c16f2008-12-17 15:59:43 +000024class SkCanvas;
scroggo@google.com1b1bcc32013-05-21 20:31:23 +000025class SkData;
robertphillipsdb539902014-07-01 08:47:04 -070026class SkPictureData;
reed@android.com8a1c16f2008-12-17 15:59:43 +000027class SkPictureRecord;
28class SkStream;
29class SkWStream;
30
scroggo@google.comf1754ec2013-06-28 21:32:00 +000031struct SkPictInfo;
32
Mike Klein744fb732014-06-23 15:13:26 -040033class SkRecord;
34
reed@android.com8a1c16f2008-12-17 15:59:43 +000035/** \class SkPicture
36
37 The SkPicture class records the drawing commands made to a canvas, to
38 be played back at a later time.
39*/
reed@google.com1a32d4a2011-04-25 20:02:38 +000040class SK_API SkPicture : public SkRefCnt {
reed@android.com8a1c16f2008-12-17 15:59:43 +000041public:
robertphillips@google.com15e9d3e2012-06-21 20:25:03 +000042 SK_DECLARE_INST_COUNT(SkPicture)
43
commit-bot@chromium.org145d1c02014-03-16 19:46:36 +000044 // AccelData provides a base class for device-specific acceleration
skia.committer@gmail.comeb849e52014-03-17 03:02:17 +000045 // data. It is added to the picture via a call to a device's optimize
commit-bot@chromium.org145d1c02014-03-16 19:46:36 +000046 // method.
47 class AccelData : public SkRefCnt {
48 public:
49 typedef uint8_t Domain;
50 typedef uint32_t Key;
51
52 AccelData(Key key) : fKey(key) { }
53
54 const Key& getKey() const { return fKey; }
55
56 // This entry point allows user's to get a unique domain prefix
57 // for their keys
58 static Domain GenerateDomain();
59 private:
60 Key fKey;
61
62 typedef SkRefCnt INHERITED;
63 };
64
commit-bot@chromium.org145d1c02014-03-16 19:46:36 +000065 /** PRIVATE / EXPERIMENTAL -- do not call */
Mike Klein744fb732014-06-23 15:13:26 -040066 void EXPERIMENTAL_addAccelData(const AccelData*) const;
67
commit-bot@chromium.org145d1c02014-03-16 19:46:36 +000068 /** PRIVATE / EXPERIMENTAL -- do not call */
Mike Klein744fb732014-06-23 15:13:26 -040069 const AccelData* EXPERIMENTAL_getAccelData(AccelData::Key) const;
commit-bot@chromium.org145d1c02014-03-16 19:46:36 +000070
reed@google.com34342f62012-06-25 14:36:28 +000071 /**
scroggo@google.comf8d7d272013-02-22 21:38:35 +000072 * Function signature defining a function that sets up an SkBitmap from encoded data. On
73 * success, the SkBitmap should have its Config, width, height, rowBytes and pixelref set.
74 * If the installed pixelref has decoded the data into pixels, then the src buffer need not be
75 * copied. If the pixelref defers the actual decode until its lockPixels() is called, then it
76 * must make a copy of the src buffer.
77 * @param src Encoded data.
78 * @param length Size of the encoded data, in bytes.
79 * @param dst SkBitmap to install the pixel ref on.
80 * @param bool Whether or not a pixel ref was successfully installed.
81 */
82 typedef bool (*InstallPixelRefProc)(const void* src, size_t length, SkBitmap* dst);
83
84 /**
85 * Recreate a picture that was serialized into a stream.
86 * @param SkStream Serialized picture data.
scroggo@google.comf8d7d272013-02-22 21:38:35 +000087 * @param proc Function pointer for installing pixelrefs on SkBitmaps representing the
88 * encoded bitmap data from the stream.
scroggo@google.comf1754ec2013-06-28 21:32:00 +000089 * @return A new SkPicture representing the serialized data, or NULL if the stream is
90 * invalid.
scroggo@google.comf8d7d272013-02-22 21:38:35 +000091 */
scroggo@google.comf1754ec2013-06-28 21:32:00 +000092 static SkPicture* CreateFromStream(SkStream*,
93 InstallPixelRefProc proc = &SkImageDecoder::DecodeMemory);
scroggo@google.comf8d7d272013-02-22 21:38:35 +000094
commit-bot@chromium.org5e0995e2014-02-07 12:20:04 +000095 /**
96 * Recreate a picture that was serialized into a buffer. If the creation requires bitmap
97 * decoding, the decoder must be set on the SkReadBuffer parameter by calling
98 * SkReadBuffer::setBitmapDecoder() before calling SkPicture::CreateFromBuffer().
99 * @param SkReadBuffer Serialized picture data.
100 * @return A new SkPicture representing the serialized data, or NULL if the buffer is
101 * invalid.
102 */
103 static SkPicture* CreateFromBuffer(SkReadBuffer&);
104
reed@android.com8a1c16f2008-12-17 15:59:43 +0000105 virtual ~SkPicture();
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000106
mtkleind3e474e2014-06-27 12:34:44 -0700107#ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE
reed@android.com8a1c16f2008-12-17 15:59:43 +0000108 /**
djsollen@google.comc9ab9872012-08-29 18:52:07 +0000109 * Creates a thread-safe clone of the picture that is ready for playback.
110 */
111 SkPicture* clone() const;
mtkleind3e474e2014-06-27 12:34:44 -0700112#endif
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000113
robertphillips643b8bd2014-06-08 05:55:05 -0700114 /** Replays the drawing commands on the specified canvas.
reed@google.com74babdf2013-05-20 17:02:41 +0000115 @param canvas the canvas receiving the drawing commands.
reed@android.com8a1c16f2008-12-17 15:59:43 +0000116 */
robertphillips9b14f262014-06-04 05:40:44 -0700117 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const;
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000118
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700119#ifdef SK_LEGACY_PICTURE_SIZE_API
120 int width() const { return SkScalarCeilToInt(fCullWidth); }
121 int height() const { return SkScalarCeilToInt(fCullHeight); }
122#endif
reed@android.com8a1c16f2008-12-17 15:59:43 +0000123
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700124 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth, cullHeight }.
125 It does not necessarily reflect the bounds of what has been recorded into the picture.
126 @return the cull rect used to create this picture
reed@android.com8a1c16f2008-12-17 15:59:43 +0000127 */
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700128 const SkRect cullRect() const { return SkRect::MakeWH(fCullWidth, fCullHeight); }
reed@android.com8a1c16f2008-12-17 15:59:43 +0000129
skia.committer@gmail.coma9157722014-04-03 03:04:26 +0000130 /** Return a non-zero, unique value representing the picture. This call is
131 only valid when not recording. Between a beginRecording/endRecording
commit-bot@chromium.org2b4e3702014-04-07 18:26:22 +0000132 pair it will just return 0 (the invalid ID). Each beginRecording/
robertphillips@google.comd5500882014-04-02 23:51:13 +0000133 endRecording pair will cause a different generation ID to be returned.
134 */
commit-bot@chromium.org2b4e3702014-04-07 18:26:22 +0000135 uint32_t uniqueID() const;
robertphillips@google.comd5500882014-04-02 23:51:13 +0000136
scroggo@google.com5a7c6be2012-10-04 21:46:08 +0000137 /**
scroggo@google.com1b1bcc32013-05-21 20:31:23 +0000138 * Function to encode an SkBitmap to an SkData. A function with this
commit-bot@chromium.org8b0e8ac2014-01-30 18:58:24 +0000139 * signature can be passed to serialize() and SkWriteBuffer.
140 * Returning NULL will tell the SkWriteBuffer to use
scroggo@google.com1b1bcc32013-05-21 20:31:23 +0000141 * SkBitmap::flatten() to store the bitmap.
reed@google.com672588b2014-01-08 15:42:01 +0000142 *
143 * @param pixelRefOffset DEPRECATED -- caller assumes it will return 0.
scroggo@google.com1b1bcc32013-05-21 20:31:23 +0000144 * @return SkData If non-NULL, holds encoded data representing the passed
145 * in bitmap. The caller is responsible for calling unref().
scroggo@google.com32ef1312013-02-22 22:04:19 +0000146 */
scroggo@google.com1b1bcc32013-05-21 20:31:23 +0000147 typedef SkData* (*EncodeBitmap)(size_t* pixelRefOffset, const SkBitmap& bm);
scroggo@google.com32ef1312013-02-22 22:04:19 +0000148
149 /**
scroggo@google.com5a7c6be2012-10-04 21:46:08 +0000150 * Serialize to a stream. If non NULL, encoder will be used to encode
151 * any bitmaps in the picture.
scroggo@google.com1b1bcc32013-05-21 20:31:23 +0000152 * encoder will never be called with a NULL pixelRefOffset.
scroggo@google.com5a7c6be2012-10-04 21:46:08 +0000153 */
scroggo@google.com32ef1312013-02-22 22:04:19 +0000154 void serialize(SkWStream*, EncodeBitmap encoder = NULL) const;
reed@android.com8a1c16f2008-12-17 15:59:43 +0000155
tomhudson@google.com381010e2013-10-24 11:12:47 +0000156 /**
commit-bot@chromium.org5e0995e2014-02-07 12:20:04 +0000157 * Serialize to a buffer.
158 */
159 void flatten(SkWriteBuffer&) const;
160
161 /**
tomhudson@google.com381010e2013-10-24 11:12:47 +0000162 * Returns true if any bitmaps may be produced when this SkPicture
163 * is replayed.
tomhudson@google.com381010e2013-10-24 11:12:47 +0000164 */
165 bool willPlayBackBitmaps() const;
166
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000167 /** Return true if the SkStream/Buffer represents a serialized picture, and
168 fills out SkPictInfo. After this function returns, the data source is not
skia.committer@gmail.comade9a342014-03-04 03:02:32 +0000169 rewound so it will have to be manually reset before passing to
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000170 CreateFromStream or CreateFromBuffer. Note, CreateFromStream and
171 CreateFromBuffer perform this check internally so these entry points are
172 intended for stand alone tools.
173 If false is returned, SkPictInfo is unmodified.
174 */
175 static bool InternalOnly_StreamIsSKP(SkStream*, SkPictInfo*);
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700176 static bool InternalOnly_BufferIsSKP(SkReadBuffer*, SkPictInfo*);
commit-bot@chromium.org6f4fb0f2014-03-03 19:18:39 +0000177
commit-bot@chromium.orgeb9547c2014-03-19 21:24:25 +0000178 /** Return true if the picture is suitable for rendering on the GPU.
179 */
180
181#if SK_SUPPORT_GPU
commit-bot@chromium.orga1ff26a2014-05-30 21:52:52 +0000182 bool suitableForGpuRasterization(GrContext*, const char ** = NULL) const;
commit-bot@chromium.orgeb9547c2014-03-19 21:24:25 +0000183#endif
184
robertphillipsd771f6b2014-07-22 10:18:06 -0700185 class DeletionListener : public SkRefCnt {
186 public:
187 virtual void onDeletion(uint32_t pictureID) = 0;
188 };
189
190 // Takes ref on listener.
191 void addDeletionListener(DeletionListener* listener) const;
192
mtklein5a246bb2014-08-14 19:17:18 -0700193 /** Return the approximate number of operations in this picture. This
194 * number may be greater or less than the number of SkCanvas calls
195 * recorded: some calls may be recorded as more than one operation, or some
196 * calls may be optimized away.
197 */
198 int approximateOpCount() const;
199
ajuma750ae262014-08-18 12:59:55 -0700200 /** Return true if this picture contains text.
201 */
202 bool hasText() const;
203
robertphillips6daadc72014-07-08 08:38:18 -0700204private:
robertphillips@google.com9a5b5702012-11-13 20:41:18 +0000205 // V2 : adds SkPixelRef's generation ID.
206 // V3 : PictInfo tag at beginning, and EOF tag at the end
207 // V4 : move SkPictInfo to be the header
208 // V5 : don't read/write FunctionPtr on cross-process (we can detect that)
209 // V6 : added serialization of SkPath's bounds (and packed its flags tighter)
210 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
211 // V8 : Add an option for encoding bitmaps
212 // V9 : Allow the reader and writer of an SKP disagree on whether to support
213 // SK_SUPPORT_HINTING_SCALE_FACTOR
reed@google.com4ed0fb72012-12-12 20:48:18 +0000214 // V10: add drawRRect, drawOval, clipRRect
scroggo@google.com74b7ffd2013-04-30 02:32:41 +0000215 // V11: modify how readBitmap and writeBitmap store their info.
reed@google.com277c3f82013-05-31 15:17:50 +0000216 // V12: add conics to SkPath, use new SkPathRef flattening
commit-bot@chromium.orgeed779d2013-08-16 10:24:37 +0000217 // V13: add flag to drawBitmapRectToRect
robertphillips@google.com7ce661d2013-08-27 16:14:03 +0000218 // parameterize blurs by sigma rather than radius
robertphillips@google.comca0c8382013-09-26 12:18:23 +0000219 // V14: Add flags word to PathRef serialization
robertphillips@google.comd5500882014-04-02 23:51:13 +0000220 // V15: Remove A1 bitmap config (and renumber remaining configs)
robertphillips@google.com466310d2013-12-03 16:43:54 +0000221 // V16: Move SkPath's isOval flag to SkPathRef
reed@google.come132f502013-12-13 19:58:46 +0000222 // V17: SkPixelRef now writes SkImageInfo
reed@google.com672588b2014-01-08 15:42:01 +0000223 // V18: SkBitmap now records x,y for its pixelref origin, instead of offset.
commit-bot@chromium.orgfed2ab62014-01-23 15:16:05 +0000224 // V19: encode matrices and regions into the ops stream
commit-bot@chromium.org5e0995e2014-02-07 12:20:04 +0000225 // V20: added bool to SkPictureImageFilter's serialization (to allow SkPicture serialization)
commit-bot@chromium.org210ae2a2014-02-27 17:40:13 +0000226 // V21: add pushCull, popCull
commit-bot@chromium.orgdcb8e542014-03-05 18:25:20 +0000227 // V22: SK_PICT_FACTORY_TAG's size is now the chunk size in bytes
commit-bot@chromium.org85faf502014-04-16 12:58:02 +0000228 // V23: SkPaint::FilterLevel became a real enum
commit-bot@chromium.org44d83c12014-04-21 13:10:25 +0000229 // V24: SkTwoPointConicalGradient now has fFlipped flag for gradient flipping
commit-bot@chromium.orgaec14382014-04-22 15:21:18 +0000230 // V25: SkDashPathEffect now only writes phase and interval array when flattening
commit-bot@chromium.org76a3b2a2014-04-24 16:54:46 +0000231 // V26: Removed boolean from SkColorShader for inheriting color from SkPaint.
commit-bot@chromium.org83f23d82014-05-22 12:27:41 +0000232 // V27: Remove SkUnitMapper from gradients (and skia).
commit-bot@chromium.org968edca2014-05-23 13:21:55 +0000233 // V28: No longer call bitmap::flatten inside SkWriteBuffer::writeBitmap.
Florin Malita5f6102d2014-06-30 10:13:28 -0400234 // V29: Removed SaveFlags parameter from save().
scroggoc870d492014-07-11 10:42:12 -0700235 // V30: Remove redundant SkMatrix from SkLocalMatrixShader.
senorblanco55b6d8b2014-07-30 11:26:46 -0700236 // V31: Add a serialized UniqueID to SkImageFilter.
djsollen3b625542014-08-14 06:29:02 -0700237 // V32: Removed SkPaintOptionsAndroid from SkPaint
fmalitab7425172014-08-26 07:56:44 -0700238 // V33: Serialize only public API of effects.
239 // V34: Add SkTextBlob serialization.
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700240 // V35: Store SkRect (rather then width & height) in header
commit-bot@chromium.orgd281c922014-02-18 22:08:16 +0000241
242 // Note: If the picture version needs to be increased then please follow the
243 // steps to generate new SKPs in (only accessible to Googlers): http://goo.gl/qATVcw
commit-bot@chromium.orge8d96142014-02-25 02:16:10 +0000244
245 // Only SKPs within the min/current picture version range (inclusive) can be read.
246 static const uint32_t MIN_PICTURE_VERSION = 19;
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700247 static const uint32_t CURRENT_PICTURE_VERSION = 35;
robertphillips@google.com9a5b5702012-11-13 20:41:18 +0000248
commit-bot@chromium.org2b4e3702014-04-07 18:26:22 +0000249 mutable uint32_t fUniqueID;
robertphillips@google.comd5500882014-04-02 23:51:13 +0000250
Robert Phillips004522f2014-07-08 12:58:20 -0400251 // TODO: make SkPictureData const when clone method goes away
252 SkAutoTDelete<SkPictureData> fData;
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700253 const SkScalar fCullWidth;
254 const SkScalar fCullHeight;
Mike Klein744fb732014-06-23 15:13:26 -0400255 mutable SkAutoTUnref<const AccelData> fAccelData;
robertphillips@google.com63f11272012-10-24 19:30:41 +0000256
robertphillipsd771f6b2014-07-22 10:18:06 -0700257 mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are refed
258
commit-bot@chromium.org2b4e3702014-04-07 18:26:22 +0000259 void needsNewGenID() { fUniqueID = SK_InvalidGenID; }
robertphillipsd771f6b2014-07-22 10:18:06 -0700260 void callDeletionListeners();
robertphillips@google.comd5500882014-04-02 23:51:13 +0000261
Robert Phillipscfaeec42014-07-13 12:00:50 -0400262 // Create a new SkPicture from an existing SkPictureData. The new picture
263 // takes ownership of 'data'.
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700264 SkPicture(SkPictureData* data, SkScalar width, SkScalar height);
scroggo@google.comf1754ec2013-06-28 21:32:00 +0000265
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700266 SkPicture(SkScalar width, SkScalar height, const SkPictureRecord& record, bool deepCopyOps);
robertphillips0bdbea72014-06-11 11:37:55 -0700267
commit-bot@chromium.org70512af2014-03-18 17:45:32 +0000268 // An OperationList encapsulates a set of operation offsets into the picture byte
269 // stream along with the CTMs needed for those operation.
commit-bot@chromium.orge3beb6b2014-04-07 19:34:38 +0000270 class OperationList : ::SkNoncopyable {
commit-bot@chromium.org70512af2014-03-18 17:45:32 +0000271 public:
commit-bot@chromium.org70512af2014-03-18 17:45:32 +0000272 // The following three entry points should only be accessed if
273 // 'valid' returns true.
robertphillips3afef1f2014-07-08 06:12:22 -0700274 int numOps() const { return fOps.count(); }
commit-bot@chromium.org70512af2014-03-18 17:45:32 +0000275 // The offset in the picture of the operation to execute.
robertphillips3afef1f2014-07-08 06:12:22 -0700276 uint32_t offset(int index) const;
commit-bot@chromium.org70512af2014-03-18 17:45:32 +0000277 // The CTM that must be installed for the operation to behave correctly
robertphillips3afef1f2014-07-08 06:12:22 -0700278 const SkMatrix& matrix(int index) const;
279
280 SkTDArray<void*> fOps;
commit-bot@chromium.org70512af2014-03-18 17:45:32 +0000281 };
282
283 /** PRIVATE / EXPERIMENTAL -- do not call
284 Return the operations required to render the content inside 'queryRect'.
285 */
mtklein533eb782014-08-27 10:39:42 -0700286 const OperationList* EXPERIMENTAL_getActiveOps(const SkRect& queryRect) const;
commit-bot@chromium.org75cf29b2014-03-24 19:40:49 +0000287
commit-bot@chromium.org9e5f85e2014-03-12 14:46:41 +0000288 void createHeader(SkPictInfo* info) const;
289 static bool IsValidPictInfo(const SkPictInfo& info);
commit-bot@chromium.org5e0995e2014-02-07 12:20:04 +0000290
robertphillips61426092014-07-10 09:35:12 -0700291 friend class SkPictureData; // to access OperationList
292 friend class SkPictureRecorder; // just for SkPicture-based constructor
293 friend class SkGpuDevice; // for EXPERIMENTAL_getActiveOps/OperationList
robertphillips98d709b2014-09-02 10:20:50 -0700294 friend class GrLayerHoister; // for EXPERIMENTAL_getActiveOps/OperationList
robertphillipsd6283302014-08-27 11:53:28 -0700295 friend class CollectLayers; // access to fRecord
robertphillips61426092014-07-10 09:35:12 -0700296 friend class SkPicturePlayback; // to get fData & OperationList
robertphillipsc26d9912014-07-10 07:21:27 -0700297 friend class SkPictureReplacementPlayback; // to access OperationList
robertphillips@google.com15e9d3e2012-06-21 20:25:03 +0000298
299 typedef SkRefCnt INHERITED;
Mike Klein744fb732014-06-23 15:13:26 -0400300
mtklein5ad6ee12014-08-11 08:08:43 -0700301 // Takes ownership of the SkRecord, refs the (optional) BBH.
robertphillipsa8d7f0b2014-08-29 08:03:56 -0700302 SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*);
mtklein7b705bb2014-08-20 14:22:58 -0700303 // Return as a new SkPicture that's backed by SkRecord.
304 static SkPicture* Forwardport(const SkPicture&);
mtklein5ad6ee12014-08-11 08:08:43 -0700305
306 SkAutoTDelete<SkRecord> fRecord;
307 SkAutoTUnref<SkBBoxHierarchy> fBBH;
tomhudson3a0f2792014-08-20 05:29:41 -0700308
mtklein53fecfb2014-08-21 09:11:37 -0700309 struct PathCounter;
310
tomhudson3a0f2792014-08-20 05:29:41 -0700311 struct Analysis {
mtkleinc551d9f2014-08-20 08:09:46 -0700312 Analysis() {} // Only used by SkPictureData codepath.
313 explicit Analysis(const SkRecord&);
tomhudson3a0f2792014-08-20 05:29:41 -0700314
315 bool suitableForGpuRasterization(const char** reason, int sampleCount) const;
316
317 bool fWillPlaybackBitmaps;
mtkleinc551d9f2014-08-20 08:09:46 -0700318 bool fHasText;
tomhudson3a0f2792014-08-20 05:29:41 -0700319 int fNumPaintWithPathEffectUses;
320 int fNumFastPathDashEffects;
321 int fNumAAConcavePaths;
322 int fNumAAHairlineConcavePaths;
mtkleinc551d9f2014-08-20 08:09:46 -0700323 } fAnalysis;
reed@android.com8a1c16f2008-12-17 15:59:43 +0000324};
325
reed@android.com8a1c16f2008-12-17 15:59:43 +0000326#endif