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

Side by Side Diff: src/gpu/GrRenderTarget.cpp

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrMemoryPool.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void GrRenderTarget::resolve() { 50 void GrRenderTarget::resolve() {
51 // go through context so that all necessary flushing occurs 51 // go through context so that all necessary flushing occurs
52 GrContext* context = this->getContext(); 52 GrContext* context = this->getContext();
53 if (NULL == context) { 53 if (NULL == context) {
54 return; 54 return;
55 } 55 }
56 context->resolveRenderTarget(this); 56 context->resolveRenderTarget(this);
57 } 57 }
58 58
59 size_t GrRenderTarget::sizeInBytes() const { 59 size_t GrRenderTarget::sizeInBytes() const {
60 int colorBits; 60 size_t colorBits;
61 if (kUnknown_GrPixelConfig == fDesc.fConfig) { 61 if (kUnknown_GrPixelConfig == fDesc.fConfig) {
62 colorBits = 32; // don't know, make a guess 62 colorBits = 32; // don't know, make a guess
63 } else { 63 } else {
64 colorBits = GrBytesPerPixel(fDesc.fConfig); 64 colorBits = GrBytesPerPixel(fDesc.fConfig);
65 } 65 }
66 uint64_t size = fDesc.fWidth; 66 uint64_t size = fDesc.fWidth;
67 size *= fDesc.fHeight; 67 size *= fDesc.fHeight;
68 size *= colorBits; 68 size *= colorBits;
69 size *= GrMax(1, fDesc.fSampleCnt); 69 size *= GrMax(1, fDesc.fSampleCnt);
70 return (size_t)(size / 8); 70 return (size_t)(size / 8);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 this->setStencilBuffer(NULL); 102 this->setStencilBuffer(NULL);
103 103
104 INHERITED::onRelease(); 104 INHERITED::onRelease();
105 } 105 }
106 106
107 void GrRenderTarget::onAbandon() { 107 void GrRenderTarget::onAbandon() {
108 this->setStencilBuffer(NULL); 108 this->setStencilBuffer(NULL);
109 109
110 INHERITED::onAbandon(); 110 INHERITED::onAbandon();
111 } 111 }
OLDNEW
« no previous file with comments | « src/gpu/GrMemoryPool.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698