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

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

Issue 1232103002: Enable stencil clipping in mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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
« src/gpu/gl/GrGLRenderTarget.h ('K') | « 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 29 matching lines...) Expand all
40 fRTLifecycle = idDesc.fLifeCycle; 40 fRTLifecycle = idDesc.fLifeCycle;
41 41
42 fViewport.fLeft = 0; 42 fViewport.fLeft = 0;
43 fViewport.fBottom = 0; 43 fViewport.fBottom = 0;
44 fViewport.fWidth = desc.fWidth; 44 fViewport.fWidth = desc.fWidth;
45 fViewport.fHeight = desc.fHeight; 45 fViewport.fHeight = desc.fHeight;
46 46
47 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample(); 47 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample();
48 48
49 SkASSERT(fGpuMemorySize <= WorseCaseSize(desc)); 49 SkASSERT(fGpuMemorySize <= WorseCaseSize(desc));
50
51 fSampleLocationsConfig = kDefault_SampleLocationsConfig;
50 } 52 }
51 53
52 GrGLRenderTarget* GrGLRenderTarget::CreateWrapped(GrGLGpu* gpu, 54 GrGLRenderTarget* GrGLRenderTarget::CreateWrapped(GrGLGpu* gpu,
53 const GrSurfaceDesc& desc, 55 const GrSurfaceDesc& desc,
54 const IDDesc& idDesc, 56 const IDDesc& idDesc,
55 int stencilBits) { 57 int stencilBits) {
56 GrGLStencilAttachment* sb = nullptr; 58 GrGLStencilAttachment* sb = nullptr;
57 if (stencilBits) { 59 if (stencilBits) {
58 GrGLStencilAttachment::IDDesc sbDesc; 60 GrGLStencilAttachment::IDDesc sbDesc;
59 GrGLStencilAttachment::Format format; 61 GrGLStencilAttachment::Format format;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int GrGLRenderTarget::totalSamples() const { 202 int GrGLRenderTarget::totalSamples() const {
201 int total_samples = this->msaaSamples(); 203 int total_samples = this->msaaSamples();
202 204
203 if (fTexFBOID != kUnresolvableFBOID) { 205 if (fTexFBOID != kUnresolvableFBOID) {
204 // If we own the resolve buffer then that is one more sample per pixel. 206 // If we own the resolve buffer then that is one more sample per pixel.
205 total_samples += 1; 207 total_samples += 1;
206 } 208 }
207 209
208 return total_samples; 210 return total_samples;
209 } 211 }
OLDNEW
« src/gpu/gl/GrGLRenderTarget.h ('K') | « src/gpu/gl/GrGLRenderTarget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698