| Index: gpu/command_buffer/service/query_manager.cc
|
| diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc
|
| index 8d85cffc033134d236bd14da66b26b35d7a47c16..af211782fab19fc828cf2c891ab56fd640fb2bda 100644
|
| --- a/gpu/command_buffer/service/query_manager.cc
|
| +++ b/gpu/command_buffer/service/query_manager.cc
|
| @@ -195,6 +195,8 @@ class AsyncPixelTransfersCompletedQuery
|
| base::subtle::MemoryBarrier();
|
| sync->process_count = submit_count;
|
| }
|
| + void MarkAsCompletedStage1(
|
| + uint32 submit_count, const AsyncMemoryParams& mem_params);
|
| };
|
|
|
| AsyncPixelTransfersCompletedQuery::AsyncPixelTransfersCompletedQuery(
|
| @@ -218,6 +220,16 @@ bool AsyncPixelTransfersCompletedQuery::End(uint32 submit_count) {
|
| mem_params.shm_data_offset = shm_offset();
|
| mem_params.shm_data_size = sizeof(QuerySync);
|
|
|
| + manager()->decoder()->WaitForReadPixels(
|
| + base::Bind(&AsyncPixelTransfersCompletedQuery::MarkAsCompletedStage1,
|
| + this, submit_count, mem_params));
|
| + return AddToPendingTransferQueue(submit_count);
|
| +}
|
| +
|
| +void AsyncPixelTransfersCompletedQuery::MarkAsCompletedStage1(
|
| + uint32 submit_count,
|
| + const AsyncMemoryParams& mem_params) {
|
| +
|
| // Ask AsyncPixelTransferDelegate to run completion callback after all
|
| // previous async transfers are done. No guarantee that callback is run
|
| // on the current thread.
|
| @@ -225,8 +237,6 @@ bool AsyncPixelTransfersCompletedQuery::End(uint32 submit_count) {
|
| mem_params,
|
| base::Bind(AsyncPixelTransfersCompletedQuery::MarkAsCompletedThreadSafe,
|
| submit_count));
|
| -
|
| - return AddToPendingTransferQueue(submit_count);
|
| }
|
|
|
| bool AsyncPixelTransfersCompletedQuery::Process() {
|
|
|