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

Unified Diff: src/gpu/GrGpu.cpp

Issue 302783002: Initial work to get ETC1 data up to the GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix some code clarity issues 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
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 111f632502f075632028689fa64fcf483f7e9e29..f9e7ac3d57c3314bab65011e014280ade9658986 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -133,6 +133,24 @@ GrTexture* GrGpu::createTexture(const GrTextureDesc& desc,
return tex;
}
+GrTexture* GrGpu::createCompressedTexture(const GrTextureDesc& desc,
+ const void* srcData, GrCompressedFormat format) {
+ if (kUnknown_GrPixelConfig == desc.fConfig) {
+ return NULL;
+ }
+ if (desc.fFlags & kRenderTarget_GrTextureFlagBit) {
+ return NULL;
+ }
+
+ // Do we support this format?
+ if (!this->caps()->compressedTextureSupport(format)) {
+ return NULL;
+ }
+
+ this->handleDirtyContext();
+ return this->onCreateCompressedTexture(desc, srcData, format);
+}
+
bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) {
SkASSERT(NULL == rt->getStencilBuffer());
GrStencilBuffer* sb =

Powered by Google App Engine
This is Rietveld 408576698