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

Unified Diff: src/gpu/gl/GrGLPathRange.h

Issue 1116123003: Improve caching of dashed paths in GrStencilAndCoverPathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@dashing-nvpr-01
Patch Set: Created 5 years, 7 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/gpu/gl/GrGLPath.cpp ('k') | src/gpu/gl/GrGLPathRange.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPathRange.h
diff --git a/src/gpu/gl/GrGLPathRange.h b/src/gpu/gl/GrGLPathRange.h
index 5cba9c79d760559dc826867d6ed933efd53f70f8..22dd1c0572321fa7a13fb8647f2183349843d146 100644
--- a/src/gpu/gl/GrGLPathRange.h
+++ b/src/gpu/gl/GrGLPathRange.h
@@ -10,6 +10,7 @@
#define GrGLPathRange_DEFINED
#include "../GrPathRange.h"
+#include "GrStrokeInfo.h"
#include "gl/GrGLFunctions.h"
class GrGLGpu;
@@ -26,7 +27,7 @@ public:
* Initialize a GL path range from a PathGenerator. This class will allocate
* the GPU path objects and initialize them lazily.
*/
- GrGLPathRange(GrGLGpu*, PathGenerator*, const SkStrokeRec&);
+ GrGLPathRange(GrGLGpu*, PathGenerator*, const GrStrokeInfo&);
/**
* Initialize a GL path range from an existing range of pre-initialized GPU
@@ -37,10 +38,13 @@ public:
GrGLuint basePathID,
int numPaths,
size_t gpuMemorySize,
- const SkStrokeRec&);
+ const GrStrokeInfo&);
GrGLuint basePathID() const { return fBasePathID; }
+ bool shouldStroke() const { return fShouldStroke; }
+ bool shouldFill() const { return fShouldFill; }
+
protected:
void onInitPath(int index, const SkPath&) const override;
@@ -48,10 +52,14 @@ protected:
void onAbandon() override;
private:
+ void init();
size_t onGpuMemorySize() const override { return fGpuMemorySize; }
+ const GrStrokeInfo fStroke;
GrGLuint fBasePathID;
mutable size_t fGpuMemorySize;
+ bool fShouldStroke;
+ bool fShouldFill;
typedef GrPathRange INHERITED;
};
« no previous file with comments | « src/gpu/gl/GrGLPath.cpp ('k') | src/gpu/gl/GrGLPathRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698