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

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

Issue 1177163005: Initialize the sample config for wrapped RTs to kUnified. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 5 years, 6 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 8
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLStencilAttachment.h" 10 #include "GrGLStencilAttachment.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 idDesc.fMSColorRenderbufferID = 0; 523 idDesc.fMSColorRenderbufferID = 0;
524 idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID; 524 idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID;
525 switch (ownership) { 525 switch (ownership) {
526 case kAdopt_GrWrapOwnership: 526 case kAdopt_GrWrapOwnership:
527 idDesc.fLifeCycle = GrGpuResource::kAdopted_LifeCycle; 527 idDesc.fLifeCycle = GrGpuResource::kAdopted_LifeCycle;
528 break; 528 break;
529 case kBorrow_GrWrapOwnership: 529 case kBorrow_GrWrapOwnership:
530 idDesc.fLifeCycle = GrGpuResource::kBorrowed_LifeCycle; 530 idDesc.fLifeCycle = GrGpuResource::kBorrowed_LifeCycle;
531 break; 531 break;
532 } 532 }
533 idDesc.fSampleConfig = GrRenderTarget::kUnified_SampleConfig;
533 534
534 GrSurfaceDesc desc; 535 GrSurfaceDesc desc;
535 desc.fConfig = wrapDesc.fConfig; 536 desc.fConfig = wrapDesc.fConfig;
536 desc.fFlags = kCheckAllocation_GrSurfaceFlag; 537 desc.fFlags = kCheckAllocation_GrSurfaceFlag;
537 desc.fWidth = wrapDesc.fWidth; 538 desc.fWidth = wrapDesc.fWidth;
538 desc.fHeight = wrapDesc.fHeight; 539 desc.fHeight = wrapDesc.fHeight;
539 desc.fSampleCnt = SkTMin(wrapDesc.fSampleCnt, this->caps()->maxSampleCount() ); 540 desc.fSampleCnt = SkTMin(wrapDesc.fSampleCnt, this->caps()->maxSampleCount() );
540 desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true); 541 desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true);
541 542
542 GrRenderTarget* tgt = SkNEW_ARGS(GrGLRenderTarget, (this, desc, idDesc)); 543 GrRenderTarget* tgt = SkNEW_ARGS(GrGLRenderTarget, (this, desc, idDesc));
(...skipping 2553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3096 this->setVertexArrayID(gpu, 0); 3097 this->setVertexArrayID(gpu, 0);
3097 } 3098 }
3098 int attrCount = gpu->glCaps().maxVertexAttributes(); 3099 int attrCount = gpu->glCaps().maxVertexAttributes();
3099 if (fDefaultVertexArrayAttribState.count() != attrCount) { 3100 if (fDefaultVertexArrayAttribState.count() != attrCount) {
3100 fDefaultVertexArrayAttribState.resize(attrCount); 3101 fDefaultVertexArrayAttribState.resize(attrCount);
3101 } 3102 }
3102 attribState = &fDefaultVertexArrayAttribState; 3103 attribState = &fDefaultVertexArrayAttribState;
3103 } 3104 }
3104 return attribState; 3105 return attribState;
3105 } 3106 }
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