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

Side by Side Diff: src/core/SkPictureData.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 | « src/core/SkPicture.cpp ('k') | tests/PictureTest.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 2011 Google Inc. 2 * Copyright 2011 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 SkPictureData_DEFINED 8 #ifndef SkPictureData_DEFINED
9 #define SkPictureData_DEFINED 9 #define SkPictureData_DEFINED
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 virtual ~SkPictureData(); 83 virtual ~SkPictureData();
84 84
85 const SkPicture::OperationList* getActiveOps(const SkIRect& queryRect) const ; 85 const SkPicture::OperationList* getActiveOps(const SkIRect& queryRect) const ;
86 86
87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; 87 void serialize(SkWStream*, SkPicture::EncodeBitmap) const;
88 void flatten(SkWriteBuffer&) const; 88 void flatten(SkWriteBuffer&) const;
89 89
90 bool containsBitmaps() const; 90 bool containsBitmaps() const;
91 91
92 bool hasText() const { return fContentInfo.hasText(); }
93
92 int opCount() const { return fContentInfo.numOperations(); } 94 int opCount() const { return fContentInfo.numOperations(); }
93 95
94 const SkData* opData() const { return fOpData; } 96 const SkData* opData() const { return fOpData; }
95 97
96 protected: 98 protected:
97 explicit SkPictureData(const SkPictInfo& info); 99 explicit SkPictureData(const SkPictInfo& info);
98 100
99 bool parseStream(SkStream*, SkPicture::InstallPixelRefProc); 101 bool parseStream(SkStream*, SkPicture::InstallPixelRefProc);
100 bool parseBuffer(SkReadBuffer& buffer); 102 bool parseBuffer(SkReadBuffer& buffer);
101 103
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 194
193 const SkPictInfo fInfo; 195 const SkPictInfo fInfo;
194 196
195 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); 197 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec);
196 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); 198 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec);
197 199
198 void initForPlayback() const; 200 void initForPlayback() const;
199 }; 201 };
200 202
201 #endif 203 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698