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

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2164623002: Fix debugging code for tracing texture creation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLGpu.h" 8 #include "GrGLGpu.h"
9 #include "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 } else { 1688 } else {
1689 bool wasMipMapDataProvided = false; 1689 bool wasMipMapDataProvided = false;
1690 if (texels.count() > 1) { 1690 if (texels.count() > 1) {
1691 wasMipMapDataProvided = true; 1691 wasMipMapDataProvided = true;
1692 } 1692 }
1693 tex = new GrGLTexture(this, budgeted, desc, idDesc, wasMipMapDataProvide d); 1693 tex = new GrGLTexture(this, budgeted, desc, idDesc, wasMipMapDataProvide d);
1694 } 1694 }
1695 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp()); 1695 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp());
1696 #ifdef TRACE_TEXTURE_CREATION 1696 #ifdef TRACE_TEXTURE_CREATION
1697 SkDebugf("--- new texture [%d] size=(%d %d) config=%d\n", 1697 SkDebugf("--- new texture [%d] size=(%d %d) config=%d\n",
1698 glTexDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig); 1698 idDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig);
1699 #endif 1699 #endif
1700 return tex; 1700 return tex;
1701 } 1701 }
1702 1702
1703 GrTexture* GrGLGpu::onCreateCompressedTexture(const GrSurfaceDesc& desc, 1703 GrTexture* GrGLGpu::onCreateCompressedTexture(const GrSurfaceDesc& desc,
1704 SkBudgeted budgeted, 1704 SkBudgeted budgeted,
1705 const SkTArray<GrMipLevel>& texels ) { 1705 const SkTArray<GrMipLevel>& texels ) {
1706 // Make sure that we're not flipping Y. 1706 // Make sure that we're not flipping Y.
1707 if (kBottomLeft_GrSurfaceOrigin == desc.fOrigin) { 1707 if (kBottomLeft_GrSurfaceOrigin == desc.fOrigin) {
1708 return return_null_texture(); 1708 return return_null_texture();
(...skipping 13 matching lines...) Expand all
1722 if (!this->uploadCompressedTexData(desc, idDesc.fInfo.fTarget, texels)) { 1722 if (!this->uploadCompressedTexData(desc, idDesc.fInfo.fTarget, texels)) {
1723 GL_CALL(DeleteTextures(1, &idDesc.fInfo.fID)); 1723 GL_CALL(DeleteTextures(1, &idDesc.fInfo.fID));
1724 return return_null_texture(); 1724 return return_null_texture();
1725 } 1725 }
1726 1726
1727 GrGLTexture* tex; 1727 GrGLTexture* tex;
1728 tex = new GrGLTexture(this, budgeted, desc, idDesc); 1728 tex = new GrGLTexture(this, budgeted, desc, idDesc);
1729 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp()); 1729 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp());
1730 #ifdef TRACE_TEXTURE_CREATION 1730 #ifdef TRACE_TEXTURE_CREATION
1731 SkDebugf("--- new compressed texture [%d] size=(%d %d) config=%d\n", 1731 SkDebugf("--- new compressed texture [%d] size=(%d %d) config=%d\n",
1732 glTexDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig); 1732 idDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig);
1733 #endif 1733 #endif
1734 return tex; 1734 return tex;
1735 } 1735 }
1736 1736
1737 namespace { 1737 namespace {
1738 1738
1739 const GrGLuint kUnknownBitCount = GrGLStencilAttachment::kUnknownBitCount; 1739 const GrGLuint kUnknownBitCount = GrGLStencilAttachment::kUnknownBitCount;
1740 1740
1741 void inline get_stencil_rb_sizes(const GrGLInterface* gl, 1741 void inline get_stencil_rb_sizes(const GrGLInterface* gl,
1742 GrGLStencilAttachment::Format* format) { 1742 GrGLStencilAttachment::Format* format) {
(...skipping 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after
4613 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4613 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4614 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4614 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4615 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4615 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4616 copyParams->fWidth = texture->width(); 4616 copyParams->fWidth = texture->width();
4617 copyParams->fHeight = texture->height(); 4617 copyParams->fHeight = texture->height();
4618 return true; 4618 return true;
4619 } 4619 }
4620 } 4620 }
4621 return false; 4621 return false;
4622 } 4622 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698