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

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

Issue 871013002: Compile fix after Add specialized content key class for resources (Closed) Base URL: https://skia.googlesource.com/skia.git@record-opt-savelayer-savelayer
Patch Set: Created 5 years, 11 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 2014 Google Inc. 3 * Copyright 2014 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 "GrResourceCache2.h" 10 #include "GrResourceCache2.h"
(...skipping 15 matching lines...) Expand all
26 SkFAIL("Too many Resource Types"); 26 SkFAIL("Too many Resource Types");
27 } 27 }
28 28
29 return static_cast<ResourceType>(type); 29 return static_cast<ResourceType>(type);
30 } 30 }
31 31
32 GrContentKey::Domain GrContentKey::GenerateDomain() { 32 GrContentKey::Domain GrContentKey::GenerateDomain() {
33 static int32_t gDomain = INHERITED::kInvalidDomain + 1; 33 static int32_t gDomain = INHERITED::kInvalidDomain + 1;
34 34
35 int32_t domain = sk_atomic_inc(&gDomain); 35 int32_t domain = sk_atomic_inc(&gDomain);
36 if (kInvalidDomain == gDomain) { 36 if (domain > SK_MaxU16) {
37 SkFAIL("Too many Content Key Domains"); 37 SkFAIL("Too many Content Key Domains");
38 } 38 }
39 39
40 return static_cast<Domain>(domain); 40 return static_cast<Domain>(domain);
41 } 41 }
42 uint32_t GrResourceKeyHash(const uint32_t* data, size_t size) { 42 uint32_t GrResourceKeyHash(const uint32_t* data, size_t size) {
43 return SkChecksum::Compute(data, size); 43 return SkChecksum::Compute(data, size);
44 } 44 }
45 45
46 ////////////////////////////////////////////////////////////////////////////// 46 //////////////////////////////////////////////////////////////////////////////
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 SkDebugf("Budget: %d items %d bytes\n", fMaxCount, fMaxBytes); 489 SkDebugf("Budget: %d items %d bytes\n", fMaxCount, fMaxBytes);
490 SkDebugf("\t\tEntry Count: current %d" 490 SkDebugf("\t\tEntry Count: current %d"
491 " (%d budgeted, %d wrapped, %d locked, %d scratch %.2g%% full), hig h %d\n", 491 " (%d budgeted, %d wrapped, %d locked, %d scratch %.2g%% full), hig h %d\n",
492 fCount, fBudgetedCount, wrapped, locked, scratch, countUtilization, fHig hWaterCount); 492 fCount, fBudgetedCount, wrapped, locked, scratch, countUtilization, fHig hWaterCount);
493 SkDebugf("\t\tEntry Bytes: current %d (budgeted %d, %.2g%% full, %d unbudget ed) high %d\n", 493 SkDebugf("\t\tEntry Bytes: current %d (budgeted %d, %.2g%% full, %d unbudget ed) high %d\n",
494 fBytes, fBudgetedBytes, byteUtilization, unbudgetedSize, fHighWa terBytes); 494 fBytes, fBudgetedBytes, byteUtilization, unbudgetedSize, fHighWa terBytes);
495 } 495 }
496 496
497 #endif 497 #endif
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