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

Unified Diff: src/gpu/GrGpu.cpp

Issue 303273008: Revert of Initial work to get ETC1 data up to the GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 36a9cf19b4020e5f0928d2531e126f00d5423c57..111f632502f075632028689fa64fcf483f7e9e29 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -110,39 +110,24 @@
GrTexture* GrGpu::createTexture(const GrTextureDesc& desc,
const void* srcData, size_t rowBytes) {
- if (!this->caps()->isConfigTexturable(desc.fConfig)) {
+ if (kUnknown_GrPixelConfig == desc.fConfig) {
return NULL;
}
-
if ((desc.fFlags & kRenderTarget_GrTextureFlagBit) &&
!this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) {
return NULL;
}
- GrTexture *tex = NULL;
- if (GrPixelConfigIsCompressed(desc.fConfig)) {
- // We shouldn't be rendering into this
- SkASSERT((desc.fFlags & kRenderTarget_GrTextureFlagBit) == 0);
-
- if (!this->caps()->npotTextureTileSupport() &&
- (!GrIsPow2(desc.fWidth) || !GrIsPow2(desc.fHeight))) {
+ this->handleDirtyContext();
+ GrTexture* tex = this->onCreateTexture(desc, srcData, rowBytes);
+ if (NULL != tex &&
+ (kRenderTarget_GrTextureFlagBit & desc.fFlags) &&
+ !(kNoStencil_GrTextureFlagBit & desc.fFlags)) {
+ SkASSERT(NULL != tex->asRenderTarget());
+ // TODO: defer this and attach dynamically
+ if (!this->attachStencilBufferToRenderTarget(tex->asRenderTarget())) {
+ tex->unref();
return NULL;
- }
-
- this->handleDirtyContext();
- tex = this->onCreateCompressedTexture(desc, srcData);
- } else {
- this->handleDirtyContext();
- tex = this->onCreateTexture(desc, srcData, rowBytes);
- if (NULL != tex &&
- (kRenderTarget_GrTextureFlagBit & desc.fFlags) &&
- !(kNoStencil_GrTextureFlagBit & desc.fFlags)) {
- SkASSERT(NULL != tex->asRenderTarget());
- // TODO: defer this and attach dynamically
- if (!this->attachStencilBufferToRenderTarget(tex->asRenderTarget())) {
- tex->unref();
- return NULL;
- }
}
}
return tex;
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698