aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrBackendSurface.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-04-27 18:48:15 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-27 18:48:19 +0000
commite3bd422fafc74dd3410c3de24a576635be92c3b4 (patch)
tree63bc3f6768299f8e4dde996df333ea4022855efe /include/gpu/GrBackendSurface.h
parentdf7e075c74110fcfebdc49ca503684162e118af5 (diff)
Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. Reason for revert: Apparently I have a few more build files to update before this can land. Original change's description: > Plumb the use of GrBackendRenderTarget throughout Skia > > Bug: skia: > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > Reviewed-on: https://skia-review.googlesource.com/14148 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f Reviewed-on: https://skia-review.googlesource.com/14531 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/gpu/GrBackendSurface.h')
-rw-r--r--include/gpu/GrBackendSurface.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h
index d9302dafc2..fd99a4312a 100644
--- a/include/gpu/GrBackendSurface.h
+++ b/include/gpu/GrBackendSurface.h
@@ -9,8 +9,9 @@
#define GrBackendSurface_DEFINED
#include "GrTypes.h"
-#include "gl/GrGLTypes.h"
-#include "vk/GrVkTypes.h"
+
+struct GrVkImageInfo;
+struct GrGLTextureInfo;
class GrBackendTexture {
public:
@@ -62,18 +63,22 @@ private:
class GrBackendRenderTarget {
public:
+ // The passed in GrVkImageInfo must live until the GrBackendTexture is no longer used in
+ // creation of SkImages or SkSurfaces.
GrBackendRenderTarget(int width,
int height,
int sampleCnt,
int stencilBits,
- const GrVkImageInfo& vkInfo);
+ const GrVkImageInfo* vkInfo);
+ // The passed in GrGLTextureInfo must live until the GrBackendTexture is no longer used in
+ // creation of SkImages or SkSurfaces.
GrBackendRenderTarget(int width,
int height,
int sampleCnt,
int stencilBits,
GrPixelConfig config,
- const GrGLFramebufferInfo& glInfo);
+ const GrGLTextureInfo* glInfo);
int width() const { return fWidth; }
int height() const { return fHeight; }
@@ -83,12 +88,12 @@ public:
GrBackend backend() const {return fBackend; }
// If the backend API is Vulkan, this returns a pointer to the GrVkImageInfo struct. Otherwise
- // it returns nullptr
+ // it returns nullptr.
const GrVkImageInfo* getVkImageInfo() const;
- // If the backend API is GL, this returns a pointer to the GrGLFramebufferInfo struct. Otherwise
+ // If the backend API is GL, this returns a pointer to the GrGLTextureInfo struct. Otherwise
// it returns nullptr.
- const GrGLFramebufferInfo* getGLFramebufferInfo() const;
+ const GrGLTextureInfo* getGLTextureInfo() const;
private:
// Temporary constructor which can be used to convert from a GrBackendRenderTargetDesc.
@@ -107,8 +112,9 @@ private:
GrBackend fBackend;
union {
- GrVkImageInfo fVkInfo;
- GrGLFramebufferInfo fGLInfo;
+ const GrVkImageInfo* fVkInfo;
+ const GrGLTextureInfo* fGLInfo;
+ GrBackendObject fHandle;
};
};