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

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

Issue 585043002: Add UniqueID to GrDrawTargetCaps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | src/gpu/GrDrawTargetCaps.h » ('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 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 10
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 1140 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
1141 1141
1142 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1142 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1143 r.appendf("%s is uploadable to a texture: %s\n", 1143 r.appendf("%s is uploadable to a texture: %s\n",
1144 kConfigNames[i], 1144 kConfigNames[i],
1145 gNY[fConfigTextureSupport[i]]); 1145 gNY[fConfigTextureSupport[i]]);
1146 } 1146 }
1147 1147
1148 return r; 1148 return r;
1149 } 1149 }
1150
1151 uint32_t GrDrawTargetCaps::CreateUniqueID() {
1152 static int32_t gUniqueID = SK_InvalidUniqueID;
1153 uint32_t id;
1154 do {
1155 id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1);
1156 } while (id == SK_InvalidUniqueID);
1157 return id;
1158 }
1159
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698