Index: src/gpu/gl/GrGLTexture.cpp |
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp |
index 29f7423ba559156757c5a28db2bd4d816e0b0121..39a8d9279feef49637882b5e7a15a1c0e59305d5 100644 |
--- a/src/gpu/gl/GrGLTexture.cpp |
+++ b/src/gpu/gl/GrGLTexture.cpp |
@@ -27,31 +27,35 @@ GrGLTexture::GrGLTexture(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& |
} |
void GrGLTexture::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) { |
- SkASSERT(0 != idDesc.fTextureID); |
+ SkASSERT(0 != idDesc.fInfo.fID); |
fTexParams.invalidate(); |
fTexParamsTimestamp = GrGpu::kExpiredTimestamp; |
- fTarget = idDesc.fTarget; |
- fTextureID = idDesc.fTextureID; |
+ fInfo = idDesc.fInfo; |
fTextureIDLifecycle = idDesc.fLifeCycle; |
} |
void GrGLTexture::onRelease() { |
- if (fTextureID) { |
+ if (fInfo.fID) { |
if (GrGpuResource::kBorrowed_LifeCycle != fTextureIDLifecycle) { |
- GL_CALL(DeleteTextures(1, &fTextureID)); |
+ GL_CALL(DeleteTextures(1, &fInfo.fID)); |
} |
- fTextureID = 0; |
+ fInfo.fID = 0; |
} |
INHERITED::onRelease(); |
} |
void GrGLTexture::onAbandon() { |
- fTextureID = 0; |
+ fInfo.fTarget = 0; |
+ fInfo.fID = 0; |
INHERITED::onAbandon(); |
} |
GrBackendObject GrGLTexture::getTextureHandle() const { |
+#ifdef SK_IGNORE_GL_TEXTURE_TARGET |
return static_cast<GrBackendObject>(this->textureID()); |
+#else |
+ return reinterpret_cast<GrBackendObject>(&fInfo); |
+#endif |
} |
void GrGLTexture::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, |