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

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

Issue 2259863002: Rename WorseCaseSize to WorstCasSize (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « src/gpu/GrTextureProvider.cpp ('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 "GrGLGpu.h" 10 #include "GrGLGpu.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID; 54 fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID;
55 fRTFBOOwnership = idDesc.fRTFBOOwnership; 55 fRTFBOOwnership = idDesc.fRTFBOOwnership;
56 56
57 fViewport.fLeft = 0; 57 fViewport.fLeft = 0;
58 fViewport.fBottom = 0; 58 fViewport.fBottom = 0;
59 fViewport.fWidth = desc.fWidth; 59 fViewport.fWidth = desc.fWidth;
60 fViewport.fHeight = desc.fHeight; 60 fViewport.fHeight = desc.fHeight;
61 61
62 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample(); 62 fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample();
63 63
64 SkASSERT(fGpuMemorySize <= WorseCaseSize(desc)); 64 SkASSERT(fGpuMemorySize <= WorstCaseSize(desc));
65 } 65 }
66 66
67 GrGLRenderTarget* GrGLRenderTarget::CreateWrapped(GrGLGpu* gpu, 67 GrGLRenderTarget* GrGLRenderTarget::CreateWrapped(GrGLGpu* gpu,
68 const GrSurfaceDesc& desc, 68 const GrSurfaceDesc& desc,
69 const IDDesc& idDesc, 69 const IDDesc& idDesc,
70 int stencilBits) { 70 int stencilBits) {
71 GrGLStencilAttachment* sb = nullptr; 71 GrGLStencilAttachment* sb = nullptr;
72 if (stencilBits) { 72 if (stencilBits) {
73 GrGLStencilAttachment::IDDesc sbDesc; 73 GrGLStencilAttachment::IDDesc sbDesc;
74 GrGLStencilAttachment::Format format; 74 GrGLStencilAttachment::Format format;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 int GrGLRenderTarget::totalSamples() const { 230 int GrGLRenderTarget::totalSamples() const {
231 int total_samples = this->msaaSamples(); 231 int total_samples = this->msaaSamples();
232 232
233 if (fTexFBOID != kUnresolvableFBOID) { 233 if (fTexFBOID != kUnresolvableFBOID) {
234 // If we own the resolve buffer then that is one more sample per pixel. 234 // If we own the resolve buffer then that is one more sample per pixel.
235 total_samples += 1; 235 total_samples += 1;
236 } 236 }
237 237
238 return total_samples; 238 return total_samples;
239 } 239 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextureProvider.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698