diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-05 13:14:44 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-05 19:06:43 +0000 |
commit | fe647b2d9ae04e94f030e5ee6e0e81e88c533ca9 (patch) | |
tree | ea81ee0da18f8bcbfd722e25569c313b33d7578a | |
parent | 287f6512f34d456b593ea030197925dfc5b15c65 (diff) |
Make flag values in GrResourceProvider and GrTextureProvider consistent
BUG=chromium:665673
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5602
Change-Id: I41522aa24cd4b4a7e085132dd9bcbfdd66bd9617
Reviewed-on: https://skia-review.googlesource.com/5602
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
-rw-r--r-- | include/gpu/GrTextureProvider.h | 1 | ||||
-rw-r--r-- | src/gpu/GrResourceProvider.h | 5 | ||||
-rw-r--r-- | src/gpu/GrTextureProvider.cpp | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h index efecc96358..f3ecfed0ef 100644 --- a/include/gpu/GrTextureProvider.h +++ b/include/gpu/GrTextureProvider.h @@ -139,6 +139,7 @@ protected: kExact_ScratchTextureFlag = 0x1, kNoPendingIO_ScratchTextureFlag = 0x2, // (http://skbug.com/4156) kNoCreate_ScratchTextureFlag = 0x4, + kLastScratchTextureFlag = kNoCreate_ScratchTextureFlag }; /** A common impl for GrTextureProvider and GrResourceProvider variants. */ diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index 70535e2344..394ae89e80 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -94,6 +94,7 @@ public: using GrTextureProvider::findAndRefTextureByUniqueKey; using GrTextureProvider::abandon; + /** These flags alias/extend GrTextureProvider::ScratchTextureFlags */ enum Flags { /** 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 @@ -101,12 +102,12 @@ public: * will occur out of order WRT the operations being flushed. * Make this automatic: https://bug.skia.org/4156 */ - kNoPendingIO_Flag = 0x1, + kNoPendingIO_Flag = GrTextureProvider::kNoPendingIO_ScratchTextureFlag, /** 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 = 0x2, + kRequireGpuMemory_Flag = GrTextureProvider::kLastScratchTextureFlag << 1, }; /** diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp index 8d6239d2a1..843bc0ca4f 100644 --- a/src/gpu/GrTextureProvider.cpp +++ b/src/gpu/GrTextureProvider.cpp @@ -19,12 +19,6 @@ #define ASSERT_SINGLE_OWNER \ SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fSingleOwner);) -enum ScratchTextureFlags { - kExact_ScratchTextureFlag = 0x1, - kNoPendingIO_ScratchTextureFlag = 0x2, - kNoCreate_ScratchTextureFlag = 0x4, -}; - GrTextureProvider::GrTextureProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* singleOwner) : fCache(cache) , fGpu(gpu) |