Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(998)

Unified Diff: src/gpu/GrTextureProvider.cpp

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrTextureProvider.cpp
diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp
index cfa6994c4b6d043b616aa335d48613ec11cbdfe0..b6ab5f9886f26d303eb997aa0e786c001744c793 100644
--- a/src/gpu/GrTextureProvider.cpp
+++ b/src/gpu/GrTextureProvider.cpp
@@ -43,6 +43,19 @@ GrTexture* GrTextureProvider::createTexture(const GrSurfaceDesc& desc, bool budg
return fGpu->createTexture(desc, budgeted, srcData, rowBytes);
}
+GrTexture* GrTextureProvider::createMipmappedTexture(const GrSurfaceDesc& desc, bool budgeted,
+ const SkMipMap& srcData) {
+ if (this->isAbandoned()) {
+ return NULL;
+ }
+ if ((desc.fFlags & kRenderTarget_GrSurfaceFlag) &&
+ !fGpu->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) {
+ return NULL;
+ }
+
+ return fGpu->createMipmappedTexture(desc, budgeted, srcData);
+}
+
GrTexture* GrTextureProvider::refScratchTexture(const GrSurfaceDesc& desc, ScratchTexMatch match,
bool calledDuringFlush) {
if (this->isAbandoned()) {

Powered by Google App Engine
This is Rietveld 408576698