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

Unified Diff: src/core/SkPictureData.h

Issue 435093003: Keep track of the number of skia operations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed the return type of numOperations 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPictureContentInfo.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.h
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h
index 6ea0b18b03c70155790bdc0ad1d4a644b6571b80..c1cfba35fb951b437f4265af0239b2591dc88fac 100644
--- a/src/core/SkPictureData.h
+++ b/src/core/SkPictureData.h
@@ -11,6 +11,7 @@
#include "SkBitmap.h"
#include "SkPathHeap.h"
#include "SkPicture.h"
+#include "SkPictureContentInfo.h"
#include "SkPictureFlat.h"
#include "SkPictureStateTree.h"
@@ -55,65 +56,6 @@ struct SkPictInfo {
// Always write this guy last (with no length field afterwards)
#define SK_PICT_EOF_TAG SkSetFourByteTag('e', 'o', 'f', ' ')
-// SkPictureContentInfo is not serialized! It is intended solely for use
-// with suitableForGpuRasterization.
-class SkPictureContentInfo {
-public:
- SkPictureContentInfo() { this->reset(); }
-
- SkPictureContentInfo(const SkPictureContentInfo& src) { this->set(src); }
-
- void set(const SkPictureContentInfo& src) {
- fNumPaintWithPathEffectUses = src.fNumPaintWithPathEffectUses;
- fNumFastPathDashEffects = src.fNumFastPathDashEffects;
- fNumAAConcavePaths = src.fNumAAConcavePaths;
- fNumAAHairlineConcavePaths = src.fNumAAHairlineConcavePaths;
- }
-
- void reset() {
- fNumPaintWithPathEffectUses = 0;
- fNumFastPathDashEffects = 0;
- fNumAAConcavePaths = 0;
- fNumAAHairlineConcavePaths = 0;
- }
-
- void swap(SkPictureContentInfo* other) {
- SkTSwap(fNumPaintWithPathEffectUses, other->fNumPaintWithPathEffectUses);
- SkTSwap(fNumFastPathDashEffects, other->fNumFastPathDashEffects);
- SkTSwap(fNumAAConcavePaths, other->fNumAAConcavePaths);
- SkTSwap(fNumAAHairlineConcavePaths, other->fNumAAHairlineConcavePaths);
- }
-
- void incPaintWithPathEffectUses() { ++fNumPaintWithPathEffectUses; }
- int numPaintWithPathEffectUses() const { return fNumPaintWithPathEffectUses; }
-
- void incFastPathDashEffects() { ++fNumFastPathDashEffects; }
- int numFastPathDashEffects() const { return fNumFastPathDashEffects; }
-
- void incAAConcavePaths() { ++fNumAAConcavePaths; }
- int numAAConcavePaths() const { return fNumAAConcavePaths; }
-
- void incAAHairlineConcavePaths() {
- ++fNumAAHairlineConcavePaths;
- SkASSERT(fNumAAHairlineConcavePaths <= fNumAAConcavePaths);
- }
- int numAAHairlineConcavePaths() const { return fNumAAHairlineConcavePaths; }
-
-private:
- // This field is incremented every time a paint with a path effect is
- // used (i.e., it is not a de-duplicated count)
- int fNumPaintWithPathEffectUses;
- // This field is incremented every time a paint with a path effect that is
- // dashed, we are drawing a line, and we can use the gpu fast path
- int fNumFastPathDashEffects;
- // This field is incremented every time an anti-aliased drawPath call is
- // issued with a concave path
- int fNumAAConcavePaths;
- // This field is incremented every time a drawPath call is
- // issued for a hairline stroked concave path.
- int fNumAAHairlineConcavePaths;
-};
-
#ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE
/**
* Container for data that is needed to deep copy a SkPicture. The container
« no previous file with comments | « src/core/SkPictureContentInfo.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698