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

Side by Side Diff: include/core/SkPicture.h

Issue 478673002: Expose API for whether an SkPicture contains text (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add a test 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
« no previous file with comments | « no previous file | src/core/SkPicture.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 /* 2 /*
3 * Copyright 2007 The Android Open Source Project 3 * Copyright 2007 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPicture_DEFINED 10 #ifndef SkPicture_DEFINED
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Takes ref on listener. 197 // Takes ref on listener.
198 void addDeletionListener(DeletionListener* listener) const; 198 void addDeletionListener(DeletionListener* listener) const;
199 199
200 /** Return the approximate number of operations in this picture. This 200 /** Return the approximate number of operations in this picture. This
201 * number may be greater or less than the number of SkCanvas calls 201 * number may be greater or less than the number of SkCanvas calls
202 * recorded: some calls may be recorded as more than one operation, or some 202 * recorded: some calls may be recorded as more than one operation, or some
203 * calls may be optimized away. 203 * calls may be optimized away.
204 */ 204 */
205 int approximateOpCount() const; 205 int approximateOpCount() const;
206 206
207 /** Return true if this picture contains text.
208 */
209 bool hasText() const;
210
207 private: 211 private:
208 // V2 : adds SkPixelRef's generation ID. 212 // V2 : adds SkPixelRef's generation ID.
209 // V3 : PictInfo tag at beginning, and EOF tag at the end 213 // V3 : PictInfo tag at beginning, and EOF tag at the end
210 // V4 : move SkPictInfo to be the header 214 // V4 : move SkPictInfo to be the header
211 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) 215 // V5 : don't read/write FunctionPtr on cross-process (we can detect that)
212 // V6 : added serialization of SkPath's bounds (and packed its flags tighter ) 216 // V6 : added serialization of SkPath's bounds (and packed its flags tighter )
213 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) 217 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
214 // V8 : Add an option for encoding bitmaps 218 // V8 : Add an option for encoding bitmaps
215 // V9 : Allow the reader and writer of an SKP disagree on whether to support 219 // V9 : Allow the reader and writer of an SKP disagree on whether to support
216 // SK_SUPPORT_HINTING_SCALE_FACTOR 220 // SK_SUPPORT_HINTING_SCALE_FACTOR
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 302
299 // Takes ownership of the SkRecord, refs the (optional) BBH. 303 // Takes ownership of the SkRecord, refs the (optional) BBH.
300 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*); 304 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*);
301 305
302 SkAutoTDelete<SkRecord> fRecord; 306 SkAutoTDelete<SkRecord> fRecord;
303 SkAutoTUnref<SkBBoxHierarchy> fBBH; 307 SkAutoTUnref<SkBBoxHierarchy> fBBH;
304 bool fRecordWillPlayBackBitmaps; // TODO: const 308 bool fRecordWillPlayBackBitmaps; // TODO: const
305 }; 309 };
306 310
307 #endif 311 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698