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

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

Issue 12965018: Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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
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 #include "GrGpu.h" 10 #include "GrGpu.h"
11 11
12 #include "GrBufferAllocPool.h" 12 #include "GrBufferAllocPool.h"
13 #include "GrContext.h" 13 #include "GrContext.h"
14 #include "GrDrawTargetCaps.h"
14 #include "GrIndexBuffer.h" 15 #include "GrIndexBuffer.h"
15 #include "GrStencilBuffer.h" 16 #include "GrStencilBuffer.h"
16 #include "GrVertexBuffer.h" 17 #include "GrVertexBuffer.h"
17 18
18 // probably makes no sense for this to be less than a page 19 // probably makes no sense for this to be less than a page
19 static const size_t VERTEX_POOL_VB_SIZE = 1 << 18; 20 static const size_t VERTEX_POOL_VB_SIZE = 1 << 18;
20 static const int VERTEX_POOL_VB_COUNT = 4; 21 static const int VERTEX_POOL_VB_COUNT = 4;
21 static const size_t INDEX_POOL_IB_SIZE = 1 << 16; 22 static const size_t INDEX_POOL_IB_SIZE = 1 << 16;
22 static const int INDEX_POOL_IB_COUNT = 4; 23 static const int INDEX_POOL_IB_COUNT = 4;
23 24
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 524 }
524 525
525 void GrGpu::releaseIndexArray() { 526 void GrGpu::releaseIndexArray() {
526 // if index source was array, we stowed data in the pool 527 // if index source was array, we stowed data in the pool
527 const GeometrySrcState& geoSrc = this->getGeomSrc(); 528 const GeometrySrcState& geoSrc = this->getGeomSrc();
528 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc); 529 GrAssert(kArray_GeometrySrcType == geoSrc.fIndexSrc);
529 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); 530 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t);
530 fIndexPool->putBack(bytes); 531 fIndexPool->putBack(bytes);
531 --fIndexPoolUseCnt; 532 --fIndexPoolUseCnt;
532 } 533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698