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

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

Issue 2814843002: gpu: GPU service scheduler. (Closed)
Patch Set: rebase Created 3 years, 7 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::EnsureWorkVisibleAsync() {}
23
22 void TestContextSupport::SignalSyncToken(const gpu::SyncToken& sync_token, 24 void TestContextSupport::SignalSyncToken(const gpu::SyncToken& sync_token,
23 const base::Closure& callback) { 25 const base::Closure& callback) {
24 sync_point_callbacks_.push_back(callback); 26 sync_point_callbacks_.push_back(callback);
25 base::ThreadTaskRunnerHandle::Get()->PostTask( 27 base::ThreadTaskRunnerHandle::Get()->PostTask(
26 FROM_HERE, base::BindOnce(&TestContextSupport::CallAllSyncPointCallbacks, 28 FROM_HERE, base::BindOnce(&TestContextSupport::CallAllSyncPointCallbacks,
27 weak_ptr_factory_.GetWeakPtr())); 29 weak_ptr_factory_.GetWeakPtr()));
28 } 30 }
29 31
30 bool TestContextSupport::IsSyncTokenSignaled(const gpu::SyncToken& sync_token) { 32 bool TestContextSupport::IsSyncTokenSignaled(const gpu::SyncToken& sync_token) {
31 return true; 33 return true;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return 0; 91 return 0;
90 } 92 }
91 93
92 void TestContextSupport::SetErrorMessageCallback( 94 void TestContextSupport::SetErrorMessageCallback(
93 const base::Callback<void(const char*, int32_t)>& callback) {} 95 const base::Callback<void(const char*, int32_t)>& callback) {}
94 96
95 void TestContextSupport::AddLatencyInfo( 97 void TestContextSupport::AddLatencyInfo(
96 const std::vector<ui::LatencyInfo>& latency_info) {} 98 const std::vector<ui::LatencyInfo>& latency_info) {}
97 99
98 } // namespace cc 100 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698