diff options
author | Greg Daniel <egdaniel@google.com> | 2017-09-25 12:25:12 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-25 16:43:06 +0000 |
commit | 29bf84f08a3716ae672dc06c237fc259fccbd136 (patch) | |
tree | 69d73ddccb5f8be092ec43ec8402d9c01b23bb81 /src/gpu/GrResourceProvider.h | |
parent | cb9adf7c6e81bf0bf4825afddf7732810f174ea2 (diff) |
Remove unneeded kExact and kNoCreate Flags from GrResouceProvider
This is change 1 of 3 to reland, https://skia-review.googlesource.com/c/skia/+/42083
Bug: skia:
Change-Id: Ia0369fc67807e369c2e90220f5824da7164a230a
Reviewed-on: https://skia-review.googlesource.com/44461
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.h')
-rw-r--r-- | src/gpu/GrResourceProvider.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index be06c8d63a..b906013fe8 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -165,22 +165,18 @@ public: /** These flags govern which scratch resources we are allowed to return */ enum Flags { - kExact_Flag = 0x1, - /** If the caller intends to do direct reads/writes to/from the CPU then this flag must be * set when accessing resources during a GrOpList 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_Flag = 0x2, - - kNoCreate_Flag = 0x4, + kNoPendingIO_Flag = 0x1, /** Normally the caps may indicate a preference for client-side buffers. Set this flag when * creating a buffer to guarantee it resides in GPU memory. */ - kRequireGpuMemory_Flag = 0x8, + kRequireGpuMemory_Flag = 0x2, }; /** @@ -258,6 +254,8 @@ private: GrTexture* findAndRefTextureByUniqueKey(const GrUniqueKey& key); void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture); + // Attempts to find a resource in the cache that exactly matches the GrSurfaceDesc. Failing that + // it returns null. If non-null, the resulting texture is always budgeted. sk_sp<GrTexture> refScratchTexture(const GrSurfaceDesc&, uint32_t scratchTextureFlags); /* |