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

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

Issue 1431593006: Fix mixed samples stencil clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrGLRenderTarget.h ('k') | 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 #include "GrGLRenderTarget.h" 8 #include "GrGLRenderTarget.h"
9 9
10 #include "GrRenderTargetPriv.h" 10 #include "GrRenderTargetPriv.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, cons t IDDesc& idDesc, 29 GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, cons t IDDesc& idDesc,
30 Derived) 30 Derived)
31 : GrSurface(gpu, idDesc.fLifeCycle, desc) 31 : GrSurface(gpu, idDesc.fLifeCycle, desc)
32 , INHERITED(gpu, idDesc.fLifeCycle, desc, idDesc.fSampleConfig) { 32 , INHERITED(gpu, idDesc.fLifeCycle, desc, idDesc.fSampleConfig) {
33 this->init(desc, idDesc); 33 this->init(desc, idDesc);
34 } 34 }
35 35
36 void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) { 36 void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
37 fRTFBOID = idDesc.fRTFBOID; 37 fRTFBOID = idDesc.fRTFBOID;
38 fTexFBOID = idDesc.fTexFBOID; 38 fTexFBOID = idDesc.fTexFBOID;
39 fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID; 39 fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID;
40 fRTLifecycle = idDesc.fLifeCycle; 40 fRTLifecycle = idDesc.fLifeCycle;
41 fHasCoCenteredSamplesTimestamp = GrGpu::kExpiredTimestamp;
41 42
42 fViewport.fLeft = 0; 43 fViewport.fLeft = 0;
43 fViewport.fBottom = 0; 44 fViewport.fBottom = 0;
44 fViewport.fWidth = desc.fWidth; 45 fViewport.fWidth = desc.fWidth;
45 fViewport.fHeight = desc.fHeight; 46 fViewport.fHeight = desc.fHeight;
46 47
47 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample(); 48 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample();
48 49
49 SkASSERT(fGpuMemorySize <= WorseCaseSize(desc)); 50 SkASSERT(fGpuMemorySize <= WorseCaseSize(desc));
50 } 51 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int GrGLRenderTarget::totalSamples() const { 201 int GrGLRenderTarget::totalSamples() const {
201 int total_samples = this->msaaSamples(); 202 int total_samples = this->msaaSamples();
202 203
203 if (fTexFBOID != kUnresolvableFBOID) { 204 if (fTexFBOID != kUnresolvableFBOID) {
204 // If we own the resolve buffer then that is one more sample per pixel. 205 // If we own the resolve buffer then that is one more sample per pixel.
205 total_samples += 1; 206 total_samples += 1;
206 } 207 }
207 208
208 return total_samples; 209 return total_samples;
209 } 210 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698