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

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

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome Created 4 years, 10 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 | « src/gpu/effects/GrTextureStripAtlas.cpp ('k') | src/image/SkImage.cpp » ('j') | 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 "GrGLGLSL.h" 9 #include "GrGLGLSL.h"
10 #include "GrGLStencilAttachment.h" 10 #include "GrGLStencilAttachment.h"
(...skipping 2179 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 GrPixelConfig rtConfig = target->config(); 2190 GrPixelConfig rtConfig = target->config();
2191 return this->glCaps().readPixelsSupported(rtConfig, readConfig, getIntegerv, bindRenderTarget); 2191 return this->glCaps().readPixelsSupported(rtConfig, readConfig, getIntegerv, bindRenderTarget);
2192 } 2192 }
2193 2193
2194 bool GrGLGpu::readPixelsSupported(GrPixelConfig rtConfig, GrPixelConfig readConf ig) { 2194 bool GrGLGpu::readPixelsSupported(GrPixelConfig rtConfig, GrPixelConfig readConf ig) {
2195 auto bindRenderTarget = [this, rtConfig]() -> bool { 2195 auto bindRenderTarget = [this, rtConfig]() -> bool {
2196 GrTextureDesc desc; 2196 GrTextureDesc desc;
2197 desc.fConfig = rtConfig; 2197 desc.fConfig = rtConfig;
2198 desc.fWidth = desc.fHeight = 16; 2198 desc.fWidth = desc.fHeight = 16;
2199 desc.fFlags = kRenderTarget_GrSurfaceFlag; 2199 desc.fFlags = kRenderTarget_GrSurfaceFlag;
2200 SkAutoTUnref<GrTexture> temp(this->createTexture(desc, false, nullptr, 0 )); 2200 SkAutoTUnref<GrTexture> temp(this->createTexture(desc, SkBudgeted::kNo, nullptr, 0));
2201 if (!temp) { 2201 if (!temp) {
2202 return false; 2202 return false;
2203 } 2203 }
2204 GrGLRenderTarget* glrt = static_cast<GrGLRenderTarget*>(temp->asRenderTa rget()); 2204 GrGLRenderTarget* glrt = static_cast<GrGLRenderTarget*>(temp->asRenderTa rget());
2205 this->flushRenderTarget(glrt, &SkIRect::EmptyIRect()); 2205 this->flushRenderTarget(glrt, &SkIRect::EmptyIRect());
2206 return true; 2206 return true;
2207 }; 2207 };
2208 auto getIntegerv = [this](GrGLenum query, GrGLint* value) { 2208 auto getIntegerv = [this](GrGLenum query, GrGLint* value) {
2209 GR_GL_GetIntegerv(this->glInterface(), query, value); 2209 GR_GL_GetIntegerv(this->glInterface(), query, value);
2210 }; 2210 };
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after
4009 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4009 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4010 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4010 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4011 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4011 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4012 copyParams->fWidth = texture->width(); 4012 copyParams->fWidth = texture->width();
4013 copyParams->fHeight = texture->height(); 4013 copyParams->fHeight = texture->height();
4014 return true; 4014 return true;
4015 } 4015 }
4016 } 4016 }
4017 return false; 4017 return false;
4018 } 4018 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureStripAtlas.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698