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

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

Issue 1464593004: More tests for EGLImage (Closed) Base URL: https://skia.googlesource.com/skia.git@external
Patch Set: rebase Created 5 years 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 | tests/EGLImageTest.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 8
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 #endif 447 #endif
448 if (GR_GL_TEXTURE_EXTERNAL == idDesc.fInfo.fTarget) { 448 if (GR_GL_TEXTURE_EXTERNAL == idDesc.fInfo.fTarget) {
449 if (renderTarget) { 449 if (renderTarget) {
450 // This combination is not supported. 450 // This combination is not supported.
451 return nullptr; 451 return nullptr;
452 } 452 }
453 if (!this->glCaps().externalTextureSupport()) { 453 if (!this->glCaps().externalTextureSupport()) {
454 return nullptr; 454 return nullptr;
455 } 455 }
456 } 456 }
457 // Sample count is interpretted to mean the number of samples that Gr code s hould allocate
458 // for a render buffer that resolves to the texture. We don't support MSAA t extures.
459 if (desc.fSampleCnt && !renderTarget) {
460 return nullptr;
461 }
457 462
458 switch (ownership) { 463 switch (ownership) {
459 case kAdopt_GrWrapOwnership: 464 case kAdopt_GrWrapOwnership:
460 idDesc.fLifeCycle = GrGpuResource::kAdopted_LifeCycle; 465 idDesc.fLifeCycle = GrGpuResource::kAdopted_LifeCycle;
461 break; 466 break;
462 case kBorrow_GrWrapOwnership: 467 case kBorrow_GrWrapOwnership:
463 idDesc.fLifeCycle = GrGpuResource::kBorrowed_LifeCycle; 468 idDesc.fLifeCycle = GrGpuResource::kBorrowed_LifeCycle;
464 break; 469 break;
465 } 470 }
466 471
(...skipping 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after
3393 this->setVertexArrayID(gpu, 0); 3398 this->setVertexArrayID(gpu, 0);
3394 } 3399 }
3395 int attrCount = gpu->glCaps().maxVertexAttributes(); 3400 int attrCount = gpu->glCaps().maxVertexAttributes();
3396 if (fDefaultVertexArrayAttribState.count() != attrCount) { 3401 if (fDefaultVertexArrayAttribState.count() != attrCount) {
3397 fDefaultVertexArrayAttribState.resize(attrCount); 3402 fDefaultVertexArrayAttribState.resize(attrCount);
3398 } 3403 }
3399 attribState = &fDefaultVertexArrayAttribState; 3404 attribState = &fDefaultVertexArrayAttribState;
3400 } 3405 }
3401 return attribState; 3406 return attribState;
3402 } 3407 }
OLDNEW
« no previous file with comments | « no previous file | tests/EGLImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698