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

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

Issue 435093003: Keep track of the number of skia operations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gyp/core.gypi ('k') | src/core/SkPictureContentInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkPictureContentInfo_DEFINED
9 #define SkPictureContentInfo_DEFINED
10
11 class GrContext;
12
13 class SkPictureContentInfo {
nduca 2014/08/02 00:59:30 it seems like a SkPictureContentInfo and SkPicture
14 public:
15 SkPictureContentInfo() { this->reset(); }
16 SkPictureContentInfo(const SkPictureContentInfo& src) { this->set(src); }
17
18 bool numOperations() const { return fNumOperations; }
19 bool hasText() const { return fNumTexts > 0; }
20 bool suitableForGpuRasterization(GrContext* context, const char **reason ,
21 int sampleCount) const;
22
23 void addOperation() { ++fNumOperations; }
24
25 void onDrawPoints(size_t count, const SkPaint& paint);
26 void onDrawPath(const SkPath& path, const SkPaint& paint);
27 void onAddPaintPtr(const SkPaint* paint);
28 void onDrawText() { ++fNumTexts; }
29
30 void set(const SkPictureContentInfo& src);
31 void reset();
32 void swap(SkPictureContentInfo* other);
33
34 private:
35 int fNumOperations;
36 int fNumTexts;
37
38 // This field is incremented every time a paint with a path effect is
39 // used (i.e., it is not a de-duplicated count)
40 int fNumPaintWithPathEffectUses;
41 // This field is incremented every time a paint with a path effect that is
42 // dashed, we are drawing a line, and we can use the gpu fast path
43 int fNumFastPathDashEffects;
44 // This field is incremented every time an anti-aliased drawPath call is
45 // issued with a concave path
46 int fNumAAConcavePaths;
47 // This field is incremented every time a drawPath call is
48 // issued for a hairline stroked concave path.
49 int fNumAAHairlineConcavePaths;
50 };
51
52 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkPictureContentInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698