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

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

Issue 1407063011: Revert of 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;
42 41
43 fViewport.fLeft = 0; 42 fViewport.fLeft = 0;
44 fViewport.fBottom = 0; 43 fViewport.fBottom = 0;
45 fViewport.fWidth = desc.fWidth; 44 fViewport.fWidth = desc.fWidth;
46 fViewport.fHeight = desc.fHeight; 45 fViewport.fHeight = desc.fHeight;
47 46
48 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample(); 47 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample();
49 48
50 SkASSERT(fGpuMemorySize <= WorseCaseSize(desc)); 49 SkASSERT(fGpuMemorySize <= WorseCaseSize(desc));
51 } 50 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 int GrGLRenderTarget::totalSamples() const { 200 int GrGLRenderTarget::totalSamples() const {
202 int total_samples = this->msaaSamples(); 201 int total_samples = this->msaaSamples();
203 202
204 if (fTexFBOID != kUnresolvableFBOID) { 203 if (fTexFBOID != kUnresolvableFBOID) {
205 // If we own the resolve buffer then that is one more sample per pixel. 204 // If we own the resolve buffer then that is one more sample per pixel.
206 total_samples += 1; 205 total_samples += 1;
207 } 206 }
208 207
209 return total_samples; 208 return total_samples;
210 } 209 }
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