aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrBackendSurface.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-11-16 14:59:48 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-17 12:53:55 +0000
commit57e0828fade9270f1fd3abf32f4e27b108c4bc1a (patch)
tree36cd92d54369d52c615d9071cc0f6f57eb5e27f5 /include/gpu/GrBackendSurface.h
parentecd62a6cf65ad2a3dcdad8decbe8677f5a74e02a (diff)
Add backend GPU objects to fiddle app
TBR=bsalomon@google.com Change-Id: I8876a4657f837436322150925233e0f36c91e8f0 Reviewed-on: https://skia-review.googlesource.com/72641 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
Diffstat (limited to 'include/gpu/GrBackendSurface.h')
-rw-r--r--include/gpu/GrBackendSurface.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h
index c9d326bc36..ce6ad194ac 100644
--- a/include/gpu/GrBackendSurface.h
+++ b/include/gpu/GrBackendSurface.h
@@ -96,6 +96,9 @@ private:
class SK_API GrBackendRenderTarget {
public:
+ // Creates an invalid backend texture.
+ GrBackendRenderTarget() : fConfig(kUnknown_GrPixelConfig) {}
+
GrBackendRenderTarget(int width,
int height,
int sampleCnt,
@@ -127,6 +130,9 @@ public:
const GrVkImageInfo* getVkImageInfo() const;
#endif
+ // Returns true if the backend texture has been initialized.
+ bool isValid() const { return fConfig != kUnknown_GrPixelConfig; }
+
private:
// Friending for access to the GrPixelConfig
friend class SkSurface;