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

Unified Diff: gpu/command_buffer/service/client_service_map.h

Issue 2503453005: Patch the results of queries that return object IDs in the passthrough cmd decoder. (Closed)
Patch Set: Helperize GetClientID Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/client_service_map.h
diff --git a/gpu/command_buffer/service/client_service_map.h b/gpu/command_buffer/service/client_service_map.h
index b28f1f7b48677b6664152e602ea120b2f6daaf7d..904a0951716e8ccd0bf5c3c96f1864b6a10abfd5 100644
--- a/gpu/command_buffer/service/client_service_map.h
+++ b/gpu/command_buffer/service/client_service_map.h
@@ -54,6 +54,24 @@ class ClientServiceMap {
return invalid_service_id();
}
+ bool GetClientID(ServiceType service_id, ClientType* client_id) const {
+ if (service_id == 0) {
+ if (client_id) {
+ *client_id = 0;
+ }
+ return true;
+ }
+ for (auto mapping : client_to_service_) {
+ if (mapping.second == service_id) {
+ if (client_id) {
+ *client_id = mapping.first;
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
ServiceType invalid_service_id() const {
return std::numeric_limits<ServiceType>::max();
}
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698