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

Unified Diff: src/gpu/GrIndexBuffer.h

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrGpuObject.cpp ('k') | src/gpu/GrPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrIndexBuffer.h
diff --git a/src/gpu/GrIndexBuffer.h b/src/gpu/GrIndexBuffer.h
index e23bc9b19acc5b2329636624fc1207a36a8eb292..113b89d3070557540aa63a5a2173997a5e458f04 100644
--- a/src/gpu/GrIndexBuffer.h
+++ b/src/gpu/GrIndexBuffer.h
@@ -21,11 +21,11 @@ public:
* @return the maximum number of quads using full size of index buffer.
*/
int maxQuads() const {
- return static_cast<int>(this->sizeInBytes() / (sizeof(uint16_t) * 6));
+ return static_cast<int>(this->gpuMemorySize() / (sizeof(uint16_t) * 6));
}
protected:
- GrIndexBuffer(GrGpu* gpu, bool isWrapped, size_t sizeInBytes, bool dynamic, bool cpuBacked)
- : INHERITED(gpu, isWrapped, sizeInBytes, dynamic, cpuBacked) {}
+ GrIndexBuffer(GrGpu* gpu, bool isWrapped, size_t gpuMemorySize, bool dynamic, bool cpuBacked)
+ : INHERITED(gpu, isWrapped, gpuMemorySize, dynamic, cpuBacked) {}
private:
typedef GrGeometryBuffer INHERITED;
};
« no previous file with comments | « src/gpu/GrGpuObject.cpp ('k') | src/gpu/GrPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698