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

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

Issue 818023002: Initialize wrapped render target wrap status correctly (Closed) Base URL: https://skia.googlesource.com/skia.git@memory-leak-debugger
Patch Set: Created 6 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 | 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 "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 427 }
428 428
429 return texture; 429 return texture;
430 } 430 }
431 431
432 GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe sc& wrapDesc) {QQQ(); 432 GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe sc& wrapDesc) {QQQ();
433 GrGLRenderTarget::IDDesc idDesc; 433 GrGLRenderTarget::IDDesc idDesc;
434 idDesc.fRTFBOID = static_cast<GrGLuint>(wrapDesc.fRenderTargetHandle); 434 idDesc.fRTFBOID = static_cast<GrGLuint>(wrapDesc.fRenderTargetHandle);
435 idDesc.fMSColorRenderbufferID = 0; 435 idDesc.fMSColorRenderbufferID = 0;
436 idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID; 436 idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID;
437 idDesc.fIsWrapped = true;
437 438
438 GrSurfaceDesc desc; 439 GrSurfaceDesc desc;
439 desc.fConfig = wrapDesc.fConfig; 440 desc.fConfig = wrapDesc.fConfig;
440 desc.fFlags = kCheckAllocation_GrSurfaceFlag; 441 desc.fFlags = kCheckAllocation_GrSurfaceFlag;
441 desc.fWidth = wrapDesc.fWidth; 442 desc.fWidth = wrapDesc.fWidth;
442 desc.fHeight = wrapDesc.fHeight; 443 desc.fHeight = wrapDesc.fHeight;
443 desc.fSampleCnt = wrapDesc.fSampleCnt; 444 desc.fSampleCnt = wrapDesc.fSampleCnt;
444 desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true); 445 desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true);
445 446
446 GrRenderTarget* tgt = SkNEW_ARGS(GrGLRenderTarget, (this, desc, idDesc)); 447 GrRenderTarget* tgt = SkNEW_ARGS(GrGLRenderTarget, (this, desc, idDesc));
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2753 this->setVertexArrayID(gpu, 0); 2754 this->setVertexArrayID(gpu, 0);
2754 } 2755 }
2755 int attrCount = gpu->glCaps().maxVertexAttributes(); 2756 int attrCount = gpu->glCaps().maxVertexAttributes();
2756 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2757 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2757 fDefaultVertexArrayAttribState.resize(attrCount); 2758 fDefaultVertexArrayAttribState.resize(attrCount);
2758 } 2759 }
2759 attribState = &fDefaultVertexArrayAttribState; 2760 attribState = &fDefaultVertexArrayAttribState;
2760 } 2761 }
2761 return attribState; 2762 return attribState;
2762 } 2763 }
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