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

Unified Diff: src/gpu/GrContext.cpp

Issue 304743004: Move ETC1 and LATC enums value to GrPixelConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove some duplicated flags in (GL)DrawTargetCaps 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/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index baa002a54a5a0c387789e78b1003f4dc4399e955..1fcbf7a66c86995bef5544349c7211448fb11a9c 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -362,6 +362,10 @@ GrTexture* GrContext::createResizedTexture(const GrTextureDesc& desc,
// no longer need to clamp at min RT size.
rtDesc.fWidth = GrNextPow2(desc.fWidth);
rtDesc.fHeight = GrNextPow2(desc.fHeight);
+
+ // We shouldn't be resizing a compressed texture.
+ SkASSERT(!GrPixelConfigIsCompressed(desc.fConfig));
+
size_t bpp = GrBytesPerPixel(desc.fConfig);
SkAutoSMalloc<128*128*4> stretchedPixels(bpp * rtDesc.fWidth * rtDesc.fHeight);
stretch_image(stretchedPixels.get(), rtDesc.fWidth, rtDesc.fHeight,
@@ -609,7 +613,7 @@ GrRenderTarget* GrContext::wrapBackendRenderTarget(const GrBackendRenderTargetDe
bool GrContext::supportsIndex8PixelConfig(const GrTextureParams* params,
int width, int height) const {
const GrDrawTargetCaps* caps = fGpu->caps();
robertphillips 2014/05/29 20:08:43 Wrong config?
krajcevski 2014/05/29 20:31:28 Done.
- if (!caps->eightBitPaletteSupport()) {
+ if (!caps->isConfigTexturable(kETC1_GrPixelConfig)) {
return false;
}
« no previous file with comments | « src/gpu/GrAtlas.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | src/gpu/GrDrawTarget.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698