Cleanup after removal of IORefs from GrSurface
The removal of IORefs from GrSurface makes a lot of other cruft obsolete.
Change-Id: I0e02d680a17dc4f4ec705cb6ee4c294738271e28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239919
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index d3264d3..7d77bbf 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -33,26 +33,10 @@
class SkTypeface;
/**
- * A factory for arbitrary resource types. This class is intended for use within the Gr code base.
- *
- * Some members force callers to make a flags (pendingIO) decision. This can be relaxed once
- * https://bug.skia.org/4156 is fixed.
+ * A factory for arbitrary resource types.
*/
class GrResourceProvider {
public:
- /** These flags govern which scratch resources we are allowed to return */
- enum class Flags {
- kNone = 0x0,
-
- /** If the caller intends to do direct reads/writes to/from the CPU then this flag must be
- * set when accessing resources during a GrOpsTask flush. This includes the execution of
- * GrOp objects. The reason is that these memory operations are done immediately and
- * will occur out of order WRT the operations being flushed.
- * Make this automatic: https://bug.skia.org/4156
- */
- kNoPendingIO = 0x1,
- };
-
GrResourceProvider(GrGpu*, GrResourceCache*, GrSingleOwner*);
/**
@@ -79,8 +63,7 @@
const GrBackendFormat& format,
GrRenderable renderable,
int renderTargetSampleCnt,
- GrProtected isProtected,
- Flags flags);
+ GrProtected isProtected);
/** Create an exact fit texture with no initial data to upload. */
sk_sp<GrTexture> createTexture(const GrSurfaceDesc& desc,
@@ -88,8 +71,7 @@
GrRenderable renderable,
int renderTargetSampleCnt,
SkBudgeted budgeted,
- GrProtected isProtected,
- Flags flags = Flags::kNone);
+ GrProtected isProtected);
sk_sp<GrTexture> createTexture(const GrSurfaceDesc& desc,
const GrBackendFormat& format,
@@ -109,8 +91,7 @@
SkBackingFit fit,
GrProtected isProtected,
GrColorType srcColorType,
- const GrMipLevel& mipLevel,
- Flags flags);
+ const GrMipLevel& mipLevel);
/**
* Creates a compressed texture. The GrGpu must support the SkImageImage::Compression type.
@@ -296,8 +277,7 @@
const GrBackendFormat& format,
GrRenderable renderable,
int renderTargetSampleCnt,
- GrProtected isProtected,
- Flags flags);
+ GrProtected isProtected);
/*
* Try to find an existing scratch texture that exactly matches 'desc'. If successful
@@ -308,8 +288,7 @@
GrRenderable renderable,
int renderTargetSampleCnt,
SkBudgeted budgeted,
- GrProtected isProtected,
- Flags flags);
+ GrProtected isProtected);
GrResourceCache* cache() { return fCache; }
const GrResourceCache* cache() const { return fCache; }
@@ -342,6 +321,4 @@
SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
};
-GR_MAKE_BITFIELD_CLASS_OPS(GrResourceProvider::Flags);
-
#endif