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

Side by Side Diff: src/gpu/GrIndexBuffer.h

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/GrGpu.cpp ('k') | src/gpu/GrMemoryPool.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 2010 Google Inc. 3 * Copyright 2010 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 10
11 #ifndef GrIndexBuffer_DEFINED 11 #ifndef GrIndexBuffer_DEFINED
12 #define GrIndexBuffer_DEFINED 12 #define GrIndexBuffer_DEFINED
13 13
14 #include "GrGeometryBuffer.h" 14 #include "GrGeometryBuffer.h"
15 15
16 class GrIndexBuffer : public GrGeometryBuffer { 16 class GrIndexBuffer : public GrGeometryBuffer {
17 public: 17 public:
18 /** 18 /**
19 * Retrieves the maximum number of quads that could be rendered 19 * Retrieves the maximum number of quads that could be rendered
20 * from the index buffer (using kTriangles_GrPrimitiveType). 20 * from the index buffer (using kTriangles_GrPrimitiveType).
21 * @return the maximum number of quads using full size of index buffer. 21 * @return the maximum number of quads using full size of index buffer.
22 */ 22 */
23 int maxQuads() const { 23 int maxQuads() const {
24 return this->sizeInBytes() / (sizeof(uint16_t) * 6); 24 return static_cast<int>(this->sizeInBytes() / (sizeof(uint16_t) * 6));
25 } 25 }
26 protected: 26 protected:
27 GrIndexBuffer(GrGpu* gpu, bool isWrapped, size_t sizeInBytes, bool dynamic, bool cpuBacked) 27 GrIndexBuffer(GrGpu* gpu, bool isWrapped, size_t sizeInBytes, bool dynamic, bool cpuBacked)
28 : INHERITED(gpu, isWrapped, sizeInBytes, dynamic, cpuBacked) {} 28 : INHERITED(gpu, isWrapped, sizeInBytes, dynamic, cpuBacked) {}
29 private: 29 private:
30 typedef GrGeometryBuffer INHERITED; 30 typedef GrGeometryBuffer INHERITED;
31 }; 31 };
32 32
33 #endif 33 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrMemoryPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698