diff options
author | 2016-02-26 13:20:48 -0800 | |
---|---|---|
committer | 2016-02-26 13:20:48 -0800 | |
commit | 55f2d2d57f4dd4109aa0c9dab6023373e3b928ec (patch) | |
tree | 6254a42add2b1442385ed153c6d1382403392287 /src/gpu/gl/GrGLTexture.cpp | |
parent | e015c2646f7f553ff10cd6b9783a3f4ededb63bf (diff) |
Creating functions for uploading a mipmapped texture.
BUG=476416
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1249543003
Review URL: https://codereview.chromium.org/1249543003
Diffstat (limited to 'src/gpu/gl/GrGLTexture.cpp')
-rw-r--r-- | src/gpu/gl/GrGLTexture.cpp | 12 |
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); } |