diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-09 17:02:09 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-09 22:32:14 +0000 |
commit | 0c51eeada6a91b03a91a17e94d0afea6331709d9 (patch) | |
tree | 280d2016faa326b1ef150f81a6e16a739cebfbbe /include/gpu | |
parent | 8c4cbf4cfb6d9236dfd69273bff7e8384744c29a (diff) |
Add GrMockRenderTarget and mock backend render targets
Change-Id: I59673dd7d0015471b7a81aa0c237c67043892454
Reviewed-on: https://skia-review.googlesource.com/113427
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrBackendSurface.h | 15 | ||||
-rw-r--r-- | include/gpu/mock/GrMockTypes.h | 7 |
2 files changed, 15 insertions, 7 deletions
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h index 94ab39aca2..0145dc44c0 100644 --- a/include/gpu/GrBackendSurface.h +++ b/include/gpu/GrBackendSurface.h @@ -113,12 +113,6 @@ public: GrBackendTexture(int width, int height, - GrPixelConfig config, - const GrMockTextureInfo& mockInfo); - - GrBackendTexture(int width, - int height, - GrPixelConfig config, GrMipMapped, const GrMockTextureInfo& mockInfo); @@ -203,6 +197,12 @@ public: GrBackendRenderTarget(int width, int height, int sampleCnt, const GrVkImageInfo& vkInfo); #endif + GrBackendRenderTarget(int width, + int height, + int sampleCnt, + int stencilBits, + const GrMockRenderTargetInfo& mockInfo); + int width() const { return fWidth; } int height() const { return fHeight; } int sampleCnt() const { return fSampleCnt; } @@ -219,6 +219,8 @@ public: const GrVkImageInfo* getVkImageInfo() const; #endif + const GrMockRenderTargetInfo* getMockRenderTargetInfo() const; + // Returns true if the backend texture has been initialized. bool isValid() const { return fConfig != kUnknown_GrPixelConfig; } @@ -249,6 +251,7 @@ private: #ifdef SK_VULKAN GrVkImageInfo fVkInfo; #endif + GrMockRenderTargetInfo fMockInfo; }; }; diff --git a/include/gpu/mock/GrMockTypes.h b/include/gpu/mock/GrMockTypes.h index 49601cb55e..6e38175838 100644 --- a/include/gpu/mock/GrMockTypes.h +++ b/include/gpu/mock/GrMockTypes.h @@ -13,7 +13,12 @@ struct GrMockTextureInfo { GrPixelConfig fConfig; - int fID; + int fID; +}; + +struct GrMockRenderTargetInfo { + GrPixelConfig fConfig; + int fID; }; /** |