aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLTexture.cpp
diff options
context:
space:
mode:
authorGravatar cblume <cblume@chromium.org>2016-02-26 13:20:48 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-26 13:20:48 -0800
commit55f2d2d57f4dd4109aa0c9dab6023373e3b928ec (patch)
tree6254a42add2b1442385ed153c6d1382403392287 /src/gpu/gl/GrGLTexture.cpp
parente015c2646f7f553ff10cd6b9783a3f4ededb63bf (diff)
Creating functions for uploading a mipmapped texture.
Diffstat (limited to 'src/gpu/gl/GrGLTexture.cpp')
-rw-r--r--src/gpu/gl/GrGLTexture.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 864547ae26..e05006c46e 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -15,14 +15,22 @@
// Because this class is virtually derived from GrSurface we must explicitly call its constructor.
GrGLTexture::GrGLTexture(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc)
: GrSurface(gpu, idDesc.fLifeCycle, desc)
- , INHERITED(gpu, idDesc.fLifeCycle, desc) {
+ , INHERITED(gpu, idDesc.fLifeCycle, desc, false) {
+ this->init(desc, idDesc);
+ this->registerWithCache();
+}
+
+GrGLTexture::GrGLTexture(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc,
+ bool wasMipMapDataProvided)
+ : GrSurface(gpu, idDesc.fLifeCycle, desc)
+ , INHERITED(gpu, idDesc.fLifeCycle, desc, wasMipMapDataProvided) {
this->init(desc, idDesc);
this->registerWithCache();
}
GrGLTexture::GrGLTexture(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc, Derived)
: GrSurface(gpu, idDesc.fLifeCycle, desc)
- , INHERITED(gpu, idDesc.fLifeCycle, desc) {
+ , INHERITED(gpu, idDesc.fLifeCycle, desc, false) {
this->init(desc, idDesc);
}