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

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

Issue 523243002: cc: Generalize raster task notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 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_IMAGE_COPY_RASTER_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_ 6 #define CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 typedef std::vector<RasterTaskState> Vector; 75 typedef std::vector<RasterTaskState> Vector;
76 76
77 RasterTaskState(const RasterTask* task, ScopedResource* resource) 77 RasterTaskState(const RasterTask* task, ScopedResource* resource)
78 : task(task), resource(resource) {} 78 : task(task), resource(resource) {}
79 79
80 const RasterTask* task; 80 const RasterTask* task;
81 ScopedResource* resource; 81 ScopedResource* resource;
82 }; 82 };
83 83
84 void OnRasterFinished(); 84 void OnRasterFinished(TaskSet task_set);
85 void OnRasterRequiredForActivationFinished();
86 void FlushCopies(); 85 void FlushCopies();
87 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; 86 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const;
88 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const; 87 void StagingStateAsValueInto(base::debug::TracedValue* staging_state) const;
89 88
90 scoped_refptr<base::SequencedTaskRunner> task_runner_; 89 scoped_refptr<base::SequencedTaskRunner> task_runner_;
91 TaskGraphRunner* task_graph_runner_; 90 TaskGraphRunner* task_graph_runner_;
92 const NamespaceToken namespace_token_; 91 const NamespaceToken namespace_token_;
93 RasterizerClient* client_; 92 RasterizerClient* client_;
94 ContextProvider* context_provider_; 93 ContextProvider* context_provider_;
95 ResourceProvider* resource_provider_; 94 ResourceProvider* resource_provider_;
96 ResourcePool* resource_pool_; 95 ResourcePool* resource_pool_;
97 96
98 RasterTaskState::Vector raster_task_states_; 97 RasterTaskState::Vector raster_task_states_;
99 98
100 bool has_performed_copy_since_last_flush_; 99 bool has_performed_copy_since_last_flush_;
101 100
102 bool raster_tasks_pending_; 101 TaskSetCollection raster_pending_;
103 bool raster_tasks_required_for_activation_pending_;
104 102
105 scoped_refptr<RasterizerTask> raster_finished_task_; 103 scoped_refptr<RasterizerTask> raster_finished_tasks_[kNumberOfTaskSets];
106 scoped_refptr<RasterizerTask> raster_required_for_activation_finished_task_;
107 104
108 // Task graph used when scheduling tasks and vector used to gather 105 // Task graph used when scheduling tasks and vector used to gather
109 // completed tasks. 106 // completed tasks.
110 TaskGraph graph_; 107 TaskGraph graph_;
111 Task::Vector completed_tasks_; 108 Task::Vector completed_tasks_;
112 109
113 base::WeakPtrFactory<ImageCopyRasterWorkerPool> 110 base::WeakPtrFactory<ImageCopyRasterWorkerPool>
114 raster_finished_weak_ptr_factory_; 111 raster_finished_weak_ptr_factory_;
115 112
116 DISALLOW_COPY_AND_ASSIGN(ImageCopyRasterWorkerPool); 113 DISALLOW_COPY_AND_ASSIGN(ImageCopyRasterWorkerPool);
117 }; 114 };
118 115
119 } // namespace cc 116 } // namespace cc
120 117
121 #endif // CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_ 118 #endif // CC_RESOURCES_IMAGE_COPY_RASTER_WORKER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698