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

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

Issue 1146073004: Trivial change to bump minimum block size for Buffer pool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 #include "GrBufferAllocPool.h" 10 #include "GrBufferAllocPool.h"
11 #include "GrCaps.h" 11 #include "GrCaps.h"
12 #include "GrGpu.h" 12 #include "GrGpu.h"
13 #include "GrIndexBuffer.h" 13 #include "GrIndexBuffer.h"
14 #include "GrTypes.h" 14 #include "GrTypes.h"
15 #include "GrVertexBuffer.h" 15 #include "GrVertexBuffer.h"
16 16
17 #include "SkTraceEvent.h" 17 #include "SkTraceEvent.h"
18 18
19 #ifdef SK_DEBUG 19 #ifdef SK_DEBUG
20 #define VALIDATE validate 20 #define VALIDATE validate
21 #else 21 #else
22 static void VALIDATE(bool = false) {} 22 static void VALIDATE(bool = false) {}
23 #endif 23 #endif
24 24
25 // page size 25 // page size
26 #define GrBufferAllocPool_MIN_BLOCK_SIZE ((size_t)1 << 12) 26 #define GrBufferAllocPool_MIN_BLOCK_SIZE ((size_t)1 << 15)
27 27
28 #define UNMAP_BUFFER(block) \ 28 #define UNMAP_BUFFER(block) \
29 do { \ 29 do { \
30 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), \ 30 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), \
31 "GrBufferAllocPool Unmapping Buffer", \ 31 "GrBufferAllocPool Unmapping Buffer", \
32 TRACE_EVENT_SCOPE_THREAD, \ 32 TRACE_EVENT_SCOPE_THREAD, \
33 "percent_unwritten", \ 33 "percent_unwritten", \
34 (float)((block).fBytesFree) / (block).fBuffer->gpuMemor ySize()); \ 34 (float)((block).fBytesFree) / (block).fBuffer->gpuMemor ySize()); \
35 (block).fBuffer->unmap(); \ 35 (block).fBuffer->unmap(); \
36 } while (false) 36 } while (false)
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 &geomBuffer, 413 &geomBuffer,
414 &offset); 414 &offset);
415 415
416 *buffer = (const GrIndexBuffer*) geomBuffer; 416 *buffer = (const GrIndexBuffer*) geomBuffer;
417 SkASSERT(0 == offset % sizeof(uint16_t)); 417 SkASSERT(0 == offset % sizeof(uint16_t));
418 *startIndex = static_cast<int>(offset / sizeof(uint16_t)); 418 *startIndex = static_cast<int>(offset / sizeof(uint16_t));
419 return ptr; 419 return ptr;
420 } 420 }
421 421
422 422
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698