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

Unified Diff: src/gpu/GrGpu.cpp

Issue 14367030: Remove GR_STATIC_RECT_VB (take 2) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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/GrGpu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
===================================================================
--- src/gpu/GrGpu.cpp (revision 8775)
+++ src/gpu/GrGpu.cpp (working copy)
@@ -34,7 +34,6 @@
, fIndexPool(NULL)
, fVertexPoolUseCnt(0)
, fIndexPoolUseCnt(0)
- , fUnitSquareVertexBuffer(NULL)
, fQuadIndexBuffer(NULL)
, fContextIsDirty(true) {
@@ -67,10 +66,7 @@
}
GrAssert(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid());
- GrAssert(NULL == fUnitSquareVertexBuffer ||
- !fUnitSquareVertexBuffer->isValid());
GrSafeSetNull(fQuadIndexBuffer);
- GrSafeSetNull(fUnitSquareVertexBuffer);
delete fVertexPool;
fVertexPool = NULL;
delete fIndexPool;
@@ -86,10 +82,7 @@
}
GrAssert(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid());
- GrAssert(NULL == fUnitSquareVertexBuffer ||
- !fUnitSquareVertexBuffer->isValid());
GrSafeSetNull(fQuadIndexBuffer);
- GrSafeSetNull(fUnitSquareVertexBuffer);
delete fVertexPool;
fVertexPool = NULL;
delete fIndexPool;
@@ -297,37 +290,6 @@
return fQuadIndexBuffer;
}
-const GrVertexBuffer* GrGpu::getUnitSquareVertexBuffer() const {
- if (NULL == fUnitSquareVertexBuffer) {
-
- static const GrPoint DATA[] = {
- { 0, 0 },
- { SK_Scalar1, 0 },
- { SK_Scalar1, SK_Scalar1 },
- { 0, SK_Scalar1 }
-#if 0
- GrPoint(0, 0),
- GrPoint(SK_Scalar1,0),
- GrPoint(SK_Scalar1,SK_Scalar1),
- GrPoint(0, SK_Scalar1)
-#endif
- };
- static const size_t SIZE = sizeof(DATA);
-
- GrGpu* me = const_cast<GrGpu*>(this);
- fUnitSquareVertexBuffer = me->createVertexBuffer(SIZE, false);
- if (NULL != fUnitSquareVertexBuffer) {
- if (!fUnitSquareVertexBuffer->updateData(DATA, SIZE)) {
- fUnitSquareVertexBuffer->unref();
- fUnitSquareVertexBuffer = NULL;
- GrCrash("Can't get vertices into buffer!");
- }
- }
- }
-
- return fUnitSquareVertexBuffer;
-}
-
////////////////////////////////////////////////////////////////////////////////
bool GrGpu::setupClipAndFlushState(DrawType type, const GrDeviceCoordTexture* dstCopy) {
« no previous file with comments | « src/gpu/GrGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698