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

Side by Side Diff: cc/test/test_context_support.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 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::IsFenceSyncReleased(uint64_t release) {
31 return true;
32 }
33
30 void TestContextSupport::SignalQuery(uint32_t query, 34 void TestContextSupport::SignalQuery(uint32_t query,
31 const base::Closure& callback) { 35 const base::Closure& callback) {
32 sync_point_callbacks_.push_back(callback); 36 sync_point_callbacks_.push_back(callback);
33 base::ThreadTaskRunnerHandle::Get()->PostTask( 37 base::ThreadTaskRunnerHandle::Get()->PostTask(
34 FROM_HERE, base::Bind(&TestContextSupport::CallAllSyncPointCallbacks, 38 FROM_HERE, base::Bind(&TestContextSupport::CallAllSyncPointCallbacks,
35 weak_ptr_factory_.GetWeakPtr())); 39 weak_ptr_factory_.GetWeakPtr()));
36 } 40 }
37 41
38 void TestContextSupport::SetAggressivelyFreeResources( 42 void TestContextSupport::SetAggressivelyFreeResources(
39 bool aggressively_free_resources) { 43 bool aggressively_free_resources) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 91
88 uint64_t TestContextSupport::ShareGroupTracingGUID() const { 92 uint64_t TestContextSupport::ShareGroupTracingGUID() const {
89 NOTIMPLEMENTED(); 93 NOTIMPLEMENTED();
90 return 0; 94 return 0;
91 } 95 }
92 96
93 void TestContextSupport::SetErrorMessageCallback( 97 void TestContextSupport::SetErrorMessageCallback(
94 const base::Callback<void(const char*, int32_t)>& callback) {} 98 const base::Callback<void(const char*, int32_t)>& callback) {}
95 99
96 } // namespace cc 100 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_context_support.h ('k') | content/common/gpu/client/context_provider_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698