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

Unified Diff: include/gpu/GrResourceKey.h

Issue 1114353004: Implement vertex buffer caching in the tessellated path renderer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT; remove GrContext and use GrResourceProvider directly Created 5 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
Index: include/gpu/GrResourceKey.h
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h
index a353dc21143766f0a1cb7a2a598e9c55dc2c375b..69c715786101b18ee741aa9d8b79f648db32c4e4 100644
--- a/include/gpu/GrResourceKey.h
+++ b/include/gpu/GrResourceKey.h
@@ -10,6 +10,7 @@
#define GrResourceKey_DEFINED
#include "GrTypes.h"
+#include "SkData.h"
#include "SkOnce.h"
#include "SkTemplates.h"
@@ -237,6 +238,7 @@ public:
GrUniqueKey& operator=(const GrUniqueKey& that) {
this->INHERITED::operator=(that);
+ this->setCustomData(that.getCustomData());
return *this;
}
@@ -245,6 +247,16 @@ public:
}
bool operator!=(const GrUniqueKey& that) const { return !(*this == that); }
+ void setCustomData(const SkData* data) {
bsalomon 2015/08/03 18:08:26 Can you modify one of the tests (or add a new test
Stephen White 2015/08/03 18:54:41 Done.
+ SkSafeRef(data);
+ fData.reset(data);
+ }
+ const SkData* getCustomData() const {
+ return fData.get();
+ }
+
+ SkAutoTUnref<const SkData> fData;
bsalomon 2015/08/03 18:08:26 Does fData need to be public?
Stephen White 2015/08/03 18:54:41 Fixed.
+
class Builder : public INHERITED::Builder {
public:
Builder(GrUniqueKey* key, Domain domain, int data32Count)

Powered by Google App Engine
This is Rietveld 408576698