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

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

Issue 2093943002: Have gpu createTestingOlyBackendTexture know if it is a render target or not (Closed) Base URL: https://skia.googlesource.com/skia.git@moreUnitTests
Patch Set: Have gpu createTestingOlyBackendTexture know if it is a render target or not 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 | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/vk/GrVkGpu.h » ('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 "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after
4525 case kBlend_GrXferBarrierType: 4525 case kBlend_GrXferBarrierType:
4526 SkASSERT(GrCaps::kAdvanced_BlendEquationSupport == 4526 SkASSERT(GrCaps::kAdvanced_BlendEquationSupport ==
4527 this->caps()->blendEquationSupport()); 4527 this->caps()->blendEquationSupport());
4528 GL_CALL(BlendBarrier()); 4528 GL_CALL(BlendBarrier());
4529 return; 4529 return;
4530 default: break; // placate compiler warnings that kNone not handled 4530 default: break; // placate compiler warnings that kNone not handled
4531 } 4531 }
4532 } 4532 }
4533 4533
4534 GrBackendObject GrGLGpu::createTestingOnlyBackendTexture(void* pixels, int w, in t h, 4534 GrBackendObject GrGLGpu::createTestingOnlyBackendTexture(void* pixels, int w, in t h,
4535 GrPixelConfig config) { 4535 GrPixelConfig config, b ool /*isRT*/) {
4536 if (!this->caps()->isConfigTexturable(config)) { 4536 if (!this->caps()->isConfigTexturable(config)) {
4537 return false; 4537 return false;
4538 } 4538 }
4539 GrGLTextureInfo* info = new GrGLTextureInfo; 4539 GrGLTextureInfo* info = new GrGLTextureInfo;
4540 info->fTarget = GR_GL_TEXTURE_2D; 4540 info->fTarget = GR_GL_TEXTURE_2D;
4541 info->fID = 0; 4541 info->fID = 0;
4542 GL_CALL(GenTextures(1, &info->fID)); 4542 GL_CALL(GenTextures(1, &info->fID));
4543 GL_CALL(ActiveTexture(GR_GL_TEXTURE0)); 4543 GL_CALL(ActiveTexture(GR_GL_TEXTURE0));
4544 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, 1)); 4544 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, 1));
4545 GL_CALL(BindTexture(info->fTarget, info->fID)); 4545 GL_CALL(BindTexture(info->fTarget, info->fID));
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4651 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4651 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4652 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4652 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4653 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4653 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4654 copyParams->fWidth = texture->width(); 4654 copyParams->fWidth = texture->width();
4655 copyParams->fHeight = texture->height(); 4655 copyParams->fHeight = texture->height();
4656 return true; 4656 return true;
4657 } 4657 }
4658 } 4658 }
4659 return false; 4659 return false;
4660 } 4660 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698