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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 2550583002: gpu: Thread-safe command buffer state lookup. (Closed)
Patch Set: jbauman's review Created 4 years 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/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 3424bc2a5310224463bbed535e1e84eed8e336d0..af8102f7c337755d2b38109eb4204fb5f5e12575 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -262,21 +262,10 @@ bool GLES2Implementation::Initialize(
return false;
}
- // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
- // Don't register a dump provider in these cases.
- // TODO(ericrk): Get this working in Android Webview. crbug.com/517156
- if (base::ThreadTaskRunnerHandle::IsSet()) {
- base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
- this, "GLES2Implementation", base::ThreadTaskRunnerHandle::Get());
- }
-
return true;
}
GLES2Implementation::~GLES2Implementation() {
- base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
- this);
-
// Make sure the queries are finished otherwise we'll delete the
// shared memory (mapped_memory_) which will free the memory used
// by the queries. The GPU process when validating that memory is still
@@ -405,6 +394,12 @@ void GLES2Implementation::SignalSyncToken(const gpu::SyncToken& sync_token,
}
}
+// For some command buffer implementations this can be called from any thread.
+// It's safe to access gpu_control_ without the lock because it is const.
+bool GLES2Implementation::IsFenceSyncReleased(uint64_t release_count) {
+ return gpu_control_->IsFenceSyncReleased(release_count);
+}
+
void GLES2Implementation::SignalQuery(uint32_t query,
const base::Closure& callback) {
// Flush previously entered commands to ensure ordering with any
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698