aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-05-04 10:09:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-04 10:09:24 -0700
commitd8ed1b64a6c85a8364c23e825164b7bebb43a3a0 (patch)
tree6b3c337b619318bee15747c3a6e38bf75fa9d8dc /include/gpu
parent973d1f1f60f2710a268a3165aa4f3460502d4be5 (diff)
Revert of Move instanced index buffer creation to flush time (patchset #6 id:100001 of https://codereview.chromium.org/1116943004/)
Reason for revert: messed up caching, recreating index buffers all the time. Original issue's description: > Move instanced index buffer creation to flush time > > Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26 TBR=joshualitt@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1126613003
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrContext.h1
-rw-r--r--include/gpu/GrResourceKey.h19
-rw-r--r--include/gpu/GrTextureProvider.h6
3 files changed, 1 insertions, 25 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 8bdc9f5b2d..dc824d51d5 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -539,6 +539,7 @@ public:
GrLayerCache* getLayerCache() { return fLayerCache.get(); }
GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; }
GrDrawTarget* getTextTarget();
+ const GrIndexBuffer* getQuadIndexBuffer() const;
GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; }
GrResourceProvider* resourceProvider() { return fResourceProvider; }
const GrResourceProvider* resourceProvider() const { return fResourceProvider; }
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h
index 50a7145929..aecdc70c0b 100644
--- a/include/gpu/GrResourceKey.h
+++ b/include/gpu/GrResourceKey.h
@@ -10,7 +10,6 @@
#define GrResourceKey_DEFINED
#include "GrTypes.h"
-#include "SkOnce.h"
#include "SkTemplates.h"
uint32_t GrResourceKeyHash(const uint32_t* data, size_t size);
@@ -267,24 +266,6 @@ public:
};
};
-/**
- * It is common to need a frequently reused GrUniqueKey where the only requirement is that the key
- * is unique. These macros create such a key in a thread safe manner so the key can be truly global
- * and only constructed once.
- */
-
-/** Place outside of function/class definitions. */
-#define GR_DECLARE_STATIC_UNIQUE_KEY(name) SK_DECLARE_STATIC_ONCE(name##_once)
-
-/** Place inside function where the key is used. */
-#define GR_DEFINE_STATIC_UNIQUE_KEY(name) \
- static GrUniqueKey name; \
- SkOnce(&name##_once, gr_init_static_unique_key_once, &name)
-
-static inline void gr_init_static_unique_key_once(GrUniqueKey* key) {
- GrUniqueKey::Builder builder(key, GrUniqueKey::GenerateDomain(), 0);
-}
-
// The cache listens for these messages to purge junk resources proactively.
class GrUniqueKeyInvalidatedMessage {
public:
diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h
index 3f8c760f9b..3e29dabd47 100644
--- a/include/gpu/GrTextureProvider.h
+++ b/include/gpu/GrTextureProvider.h
@@ -154,12 +154,6 @@ protected:
fGpu = NULL;
}
- GrResourceCache* cache() { return fCache; }
- const GrResourceCache* cache() const { return fCache; }
-
- GrGpu* gpu() { return fGpu; }
- const GrGpu* gpu() const { return fGpu; }
-
private:
bool isAbandoned() const {
SkASSERT(SkToBool(fGpu) == SkToBool(fCache));