Chromium Code Reviews

Side by Side Diff: cc/resources/one_copy_tile_task_worker_pool.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_
6 #define CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 6 #define CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "cc/base/scoped_ptr_deque.h" 11 #include "cc/base/scoped_ptr_deque.h"
12 #include "cc/output/context_provider.h" 12 #include "cc/output/context_provider.h"
13 #include "cc/resources/resource_provider.h" 13 #include "cc/resources/resource_provider.h"
14 #include "cc/resources/tile_task_runner.h" 14 #include "cc/resources/tile_task_runner.h"
15 #include "cc/resources/tile_task_worker_pool.h" 15 #include "cc/resources/tile_task_worker_pool.h"
16 16
17 namespace base { 17 namespace base {
18 namespace trace_event { 18 namespace trace_event {
19 class ConvertableToTraceFormat; 19 class ConvertableToTraceFormat;
20 class TracedValue; 20 class TracedValue;
21 } 21 }
22
23 // TODO(ssid): remove these aliases after the tracing clients are moved to the
24 // new trace_event namespace. See crbug.com/451032. ETA: March 2015
25 namespace debug {
26 using ::base::trace_event::ConvertableToTraceFormat;
27 using ::base::trace_event::TracedValue;
28 } 22 }
29 } // namespace base
30 23
31 namespace cc { 24 namespace cc {
32 class ResourcePool; 25 class ResourcePool;
33 class ScopedResource; 26 class ScopedResource;
34 27
35 typedef int64 CopySequenceNumber; 28 typedef int64 CopySequenceNumber;
36 29
37 class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, 30 class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool,
38 public TileTaskRunner, 31 public TileTaskRunner,
39 public TileTaskClient { 32 public TileTaskClient {
(...skipping 57 matching lines...)
97 scoped_ptr<ScopedResource> src; 90 scoped_ptr<ScopedResource> src;
98 const Resource* dst; 91 const Resource* dst;
99 }; 92 };
100 93
101 void OnTaskSetFinished(TaskSet task_set); 94 void OnTaskSetFinished(TaskSet task_set);
102 void AdvanceLastFlushedCopyTo(CopySequenceNumber sequence); 95 void AdvanceLastFlushedCopyTo(CopySequenceNumber sequence);
103 void IssueCopyOperations(int64 count); 96 void IssueCopyOperations(int64 count);
104 void ScheduleCheckForCompletedCopyOperationsWithLockAcquired( 97 void ScheduleCheckForCompletedCopyOperationsWithLockAcquired(
105 bool wait_if_needed); 98 bool wait_if_needed);
106 void CheckForCompletedCopyOperations(bool wait_if_needed); 99 void CheckForCompletedCopyOperations(bool wait_if_needed);
107 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; 100 scoped_refptr<base::trace_event::ConvertableToTraceFormat> StateAsValue()
108 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const; 101 const;
102 void StagingStateAsValueInto(
103 base::trace_event::TracedValue* staging_state) const;
109 104
110 scoped_refptr<base::SequencedTaskRunner> task_runner_; 105 scoped_refptr<base::SequencedTaskRunner> task_runner_;
111 TaskGraphRunner* task_graph_runner_; 106 TaskGraphRunner* task_graph_runner_;
112 const NamespaceToken namespace_token_; 107 const NamespaceToken namespace_token_;
113 TileTaskRunnerClient* client_; 108 TileTaskRunnerClient* client_;
114 ContextProvider* context_provider_; 109 ContextProvider* context_provider_;
115 ResourceProvider* resource_provider_; 110 ResourceProvider* resource_provider_;
116 ResourcePool* resource_pool_; 111 ResourcePool* resource_pool_;
117 TaskSetCollection tasks_pending_; 112 TaskSetCollection tasks_pending_;
118 scoped_refptr<TileTask> task_set_finished_tasks_[kNumberOfTaskSets]; 113 scoped_refptr<TileTask> task_set_finished_tasks_[kNumberOfTaskSets];
(...skipping 21 matching lines...)
140 // canceled when ScheduleTasks() is called. 135 // canceled when ScheduleTasks() is called.
141 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> 136 base::WeakPtrFactory<OneCopyTileTaskWorkerPool>
142 task_set_finished_weak_ptr_factory_; 137 task_set_finished_weak_ptr_factory_;
143 138
144 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); 139 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool);
145 }; 140 };
146 141
147 } // namespace cc 142 } // namespace cc
148 143
149 #endif // CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 144 #endif // CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « cc/resources/gpu_tile_task_worker_pool.cc ('k') | cc/resources/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine