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

Side by Side Diff: cc/test/test_context_support.cc

Issue 2727573003: gpu: Add sync token dependencies to flush metadata. (Closed)
Patch Set: jbauman's review Created 3 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/test_context_support.h" 5 #include "cc/test/test_context_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/threading/thread_task_runner_handle.h" 13 #include "base/threading/thread_task_runner_handle.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 TestContextSupport::TestContextSupport() 17 TestContextSupport::TestContextSupport()
18 : out_of_order_callbacks_(false), weak_ptr_factory_(this) {} 18 : out_of_order_callbacks_(false), weak_ptr_factory_(this) {}
19 19
20 TestContextSupport::~TestContextSupport() {} 20 TestContextSupport::~TestContextSupport() {}
21 21
22 void TestContextSupport::SignalSyncToken(const gpu::SyncToken& sync_token, 22 void TestContextSupport::SignalSyncToken(const gpu::SyncToken& sync_token,
23 const base::Closure& callback) { 23 const base::Closure& callback) {
24 sync_point_callbacks_.push_back(callback); 24 sync_point_callbacks_.push_back(callback);
25 base::ThreadTaskRunnerHandle::Get()->PostTask( 25 base::ThreadTaskRunnerHandle::Get()->PostTask(
26 FROM_HERE, base::Bind(&TestContextSupport::CallAllSyncPointCallbacks, 26 FROM_HERE, base::Bind(&TestContextSupport::CallAllSyncPointCallbacks,
27 weak_ptr_factory_.GetWeakPtr())); 27 weak_ptr_factory_.GetWeakPtr()));
28 } 28 }
29 29
30 bool TestContextSupport::IsSyncTokenSignalled( 30 bool TestContextSupport::IsSyncTokenSignaled(const gpu::SyncToken& sync_token) {
31 const gpu::SyncToken& sync_token) {
32 return true; 31 return true;
33 } 32 }
34 33
35 void TestContextSupport::SignalQuery(uint32_t query, 34 void TestContextSupport::SignalQuery(uint32_t query,
36 const base::Closure& callback) { 35 const base::Closure& callback) {
37 sync_point_callbacks_.push_back(callback); 36 sync_point_callbacks_.push_back(callback);
38 base::ThreadTaskRunnerHandle::Get()->PostTask( 37 base::ThreadTaskRunnerHandle::Get()->PostTask(
39 FROM_HERE, base::Bind(&TestContextSupport::CallAllSyncPointCallbacks, 38 FROM_HERE, base::Bind(&TestContextSupport::CallAllSyncPointCallbacks,
40 weak_ptr_factory_.GetWeakPtr())); 39 weak_ptr_factory_.GetWeakPtr()));
41 } 40 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 86
88 uint64_t TestContextSupport::ShareGroupTracingGUID() const { 87 uint64_t TestContextSupport::ShareGroupTracingGUID() const {
89 NOTIMPLEMENTED(); 88 NOTIMPLEMENTED();
90 return 0; 89 return 0;
91 } 90 }
92 91
93 void TestContextSupport::SetErrorMessageCallback( 92 void TestContextSupport::SetErrorMessageCallback(
94 const base::Callback<void(const char*, int32_t)>& callback) {} 93 const base::Callback<void(const char*, int32_t)>& callback) {}
95 94
96 } // namespace cc 95 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698