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

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

Issue 916103006: Handle the case when the GrResourceCache timestamp wraps. (Closed) Base URL: https://skia.googlesource.com/skia.git@sharesb
Patch Set: fix warning Created 5 years, 10 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 | « src/gpu/GrResourceCache.cpp ('k') | tests/ResourceCacheTest.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 2013 Google Inc. 3 * Copyright 2013 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 #include "GrTest.h" 9 #include "GrTest.h"
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 " (%d budgeted, %d wrapped, %d locked, %d scratch %.2g%% full), high %d\n", 118 " (%d budgeted, %d wrapped, %d locked, %d scratch %.2g%% full), high %d\n",
119 fCount, fBudgetedCount, stats.fWrapped, locked, stats.fScratch, countUtilization, 119 fCount, fBudgetedCount, stats.fWrapped, locked, stats.fScratch, countUtilization,
120 fHighWaterCount); 120 fHighWaterCount);
121 out->appendf("\t\tEntry Bytes: current %d (budgeted %d, %.2g%% full, %d unbu dgeted) high %d\n", 121 out->appendf("\t\tEntry Bytes: current %d (budgeted %d, %.2g%% full, %d unbu dgeted) high %d\n",
122 SkToInt(fBytes), SkToInt(fBudgetedBytes), byteUtilization, 122 SkToInt(fBytes), SkToInt(fBudgetedBytes), byteUtilization,
123 SkToInt(stats.fUnbudgetedSize), SkToInt(fHighWaterBytes)); 123 SkToInt(stats.fUnbudgetedSize), SkToInt(fHighWaterBytes));
124 } 124 }
125 125
126 #endif 126 #endif
127 127
128 ///////////////////////////////////////////////////////////////////////////////
129
130 void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT imestamp; }
128 131
129 /////////////////////////////////////////////////////////////////////////////// 132 ///////////////////////////////////////////////////////////////////////////////
130 // Code for the mock context. It's built on a mock GrGpu class that does nothing . 133 // Code for the mock context. It's built on a mock GrGpu class that does nothing .
131 //// 134 ////
132 135
133 #include "GrBufferAllocPool.h" 136 #include "GrBufferAllocPool.h"
134 #include "GrInOrderDrawBuffer.h" 137 #include "GrInOrderDrawBuffer.h"
135 #include "GrGpu.h" 138 #include "GrGpu.h"
136 139
137 class GrPipeline; 140 class GrPipeline;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // these objects are required for any of tests that use this context. TODO: make stop allocating 266 // these objects are required for any of tests that use this context. TODO: make stop allocating
264 // resources in the buffer pools. 267 // resources in the buffer pools.
265 SkDELETE(fDrawBuffer); 268 SkDELETE(fDrawBuffer);
266 SkDELETE(fDrawBufferVBAllocPool); 269 SkDELETE(fDrawBufferVBAllocPool);
267 SkDELETE(fDrawBufferIBAllocPool); 270 SkDELETE(fDrawBufferIBAllocPool);
268 271
269 fDrawBuffer = NULL; 272 fDrawBuffer = NULL;
270 fDrawBufferVBAllocPool = NULL; 273 fDrawBufferVBAllocPool = NULL;
271 fDrawBufferIBAllocPool = NULL; 274 fDrawBufferIBAllocPool = NULL;
272 } 275 }
OLDNEW
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698