aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBackendSurface.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-12-04 11:23:19 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-04 16:43:39 +0000
commite7d8da4b20babbe17abc8f95dd2dea56ee8f9af5 (patch)
tree100e00396f82be2352ff064763f657be9806f8f6 /src/gpu/GrBackendSurface.cpp
parent8da3655c6e077c2977a0d3b92aef1de6701277ba (diff)
Add support for internal gl format in GrGLTextureInfo
This gives clients the ability to wrap GL textures with just the GL Format. This enables us to distinquish between wrapping in Alpha8 texture that is implented with Alpha or Red format Bug: skia: Change-Id: Iacbea60a149c436c270b7ff9ce5d019947678793 Reviewed-on: https://skia-review.googlesource.com/72600 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrBackendSurface.cpp')
-rw-r--r--src/gpu/GrBackendSurface.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gpu/GrBackendSurface.cpp b/src/gpu/GrBackendSurface.cpp
index 02e909b118..a9fd57fac0 100644
--- a/src/gpu/GrBackendSurface.cpp
+++ b/src/gpu/GrBackendSurface.cpp
@@ -7,6 +7,8 @@
#include "GrBackendSurface.h"
+#include "gl/GrGLUtil.h"
+
#ifdef SK_VULKAN
#include "vk/GrVkTypes.h"
#include "vk/GrVkUtil.h"
@@ -44,6 +46,17 @@ GrBackendTexture::GrBackendTexture(int width,
GrBackendTexture::GrBackendTexture(int width,
int height,
+ GrMipMapped mipMapped,
+ const GrGLTextureInfo& glInfo)
+ : fWidth(width)
+ , fHeight(height)
+ , fConfig(GrGLSizedFormatToPixelConfig(glInfo.fFormat))
+ , fMipMapped(mipMapped)
+ , fBackend(kOpenGL_GrBackend)
+ , fGLInfo(glInfo) {}
+
+GrBackendTexture::GrBackendTexture(int width,
+ int height,
GrPixelConfig config,
const GrMockTextureInfo& mockInfo)
: GrBackendTexture(width, height, config, GrMipMapped::kNo, mockInfo) {}