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

Unified Diff: components/mus/gles2/command_buffer_local.cc

Issue 1610783002: mustash: gpu: implement SignalQuery in CommandBufferLocal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run on GPU thread. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/gles2/command_buffer_local.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/command_buffer_local.cc
diff --git a/components/mus/gles2/command_buffer_local.cc b/components/mus/gles2/command_buffer_local.cc
index 834722ca5bc1b43181b5992ad96011df7181e4f9..e987ceae67451c4f50028072447fd109f31e4bb9 100644
--- a/components/mus/gles2/command_buffer_local.cc
+++ b/components/mus/gles2/command_buffer_local.cc
@@ -326,11 +326,13 @@ void CommandBufferLocal::SignalSyncPoint(uint32_t sync_point,
base::Bind(&PostTask, client_thread_task_runner_, callback));
}
-void CommandBufferLocal::SignalQuery(uint32_t query,
+void CommandBufferLocal::SignalQuery(uint32_t query_id,
const base::Closure& callback) {
DCHECK(CalledOnValidThread());
- // TODO(piman)
- NOTIMPLEMENTED();
+
+ gpu_state_->command_buffer_task_runner()->PostTask(
+ driver_.get(), base::Bind(&CommandBufferLocal::SignalQueryOnGpuThread,
+ base::Unretained(this), query_id, callback));
}
void CommandBufferLocal::SetLock(base::Lock* lock) {
@@ -551,6 +553,12 @@ bool CommandBufferLocal::DeleteOnGpuThread() {
return true;
}
+bool CommandBufferLocal::SignalQueryOnGpuThread(uint32_t query_id,
+ const base::Closure& callback) {
+ driver_->SignalQuery(query_id, callback);
Peng 2016/01/20 22:27:29 You must make sure the callback is called on the c
Hadi 2016/01/21 15:46:27 Done.
+ return true;
+}
+
void CommandBufferLocal::DidLoseContextOnClientThread(uint32_t reason) {
if (client_)
client_->DidLoseContext();
« no previous file with comments | « components/mus/gles2/command_buffer_local.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698