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

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

Issue 1381163002: Add a flag to disable partial raster in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback + UT refactoring Created 5 years, 2 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
« no previous file with comments | « no previous file | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 5 #ifndef CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
6 #define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 6 #define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 30 matching lines...) Expand all
41 public base::trace_event::MemoryDumpProvider { 41 public base::trace_event::MemoryDumpProvider {
42 public: 42 public:
43 ~OneCopyTileTaskWorkerPool() override; 43 ~OneCopyTileTaskWorkerPool() override;
44 44
45 static scoped_ptr<TileTaskWorkerPool> Create( 45 static scoped_ptr<TileTaskWorkerPool> Create(
46 base::SequencedTaskRunner* task_runner, 46 base::SequencedTaskRunner* task_runner,
47 TaskGraphRunner* task_graph_runner, 47 TaskGraphRunner* task_graph_runner,
48 ContextProvider* context_provider, 48 ContextProvider* context_provider,
49 ResourceProvider* resource_provider, 49 ResourceProvider* resource_provider,
50 int max_copy_texture_chromium_size, 50 int max_copy_texture_chromium_size,
51 bool use_persistent_gpu_memory_buffers, 51 bool use_partial_raster,
52 int max_staging_buffer_usage_in_bytes, 52 int max_staging_buffer_usage_in_bytes,
53 bool use_rgba_4444_texture_format); 53 bool use_rgba_4444_texture_format);
54 54
55 // Overridden from TileTaskWorkerPool: 55 // Overridden from TileTaskWorkerPool:
56 TileTaskRunner* AsTileTaskRunner() override; 56 TileTaskRunner* AsTileTaskRunner() override;
57 57
58 // Overridden from TileTaskRunner: 58 // Overridden from TileTaskRunner:
59 void SetClient(TileTaskRunnerClient* client) override; 59 void SetClient(TileTaskRunnerClient* client) override;
60 void Shutdown() override; 60 void Shutdown() override;
61 void ScheduleTasks(TileTaskQueue* queue) override; 61 void ScheduleTasks(TileTaskQueue* queue) override;
(...skipping 22 matching lines...) Expand all
84 float scale, 84 float scale,
85 bool include_images, 85 bool include_images,
86 uint64_t resource_content_id, 86 uint64_t resource_content_id,
87 uint64_t previous_content_id); 87 uint64_t previous_content_id);
88 88
89 protected: 89 protected:
90 OneCopyTileTaskWorkerPool(base::SequencedTaskRunner* task_runner, 90 OneCopyTileTaskWorkerPool(base::SequencedTaskRunner* task_runner,
91 TaskGraphRunner* task_graph_runner, 91 TaskGraphRunner* task_graph_runner,
92 ResourceProvider* resource_provider, 92 ResourceProvider* resource_provider,
93 int max_copy_texture_chromium_size, 93 int max_copy_texture_chromium_size,
94 bool use_persistent_gpu_memory_buffers, 94 bool use_partial_raster,
95 int max_staging_buffer_usage_in_bytes, 95 int max_staging_buffer_usage_in_bytes,
96 bool use_rgba_4444_texture_format); 96 bool use_rgba_4444_texture_format);
97 97
98 private: 98 private:
99 struct StagingBuffer { 99 struct StagingBuffer {
100 StagingBuffer(const gfx::Size& size, ResourceFormat format); 100 StagingBuffer(const gfx::Size& size, ResourceFormat format);
101 ~StagingBuffer(); 101 ~StagingBuffer();
102 102
103 void DestroyGLResources(gpu::gles2::GLES2Interface* gl); 103 void DestroyGLResources(gpu::gles2::GLES2Interface* gl);
104 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 104 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
(...skipping 27 matching lines...) Expand all
132 const; 132 const;
133 void StagingStateAsValueInto( 133 void StagingStateAsValueInto(
134 base::trace_event::TracedValue* staging_state) const; 134 base::trace_event::TracedValue* staging_state) const;
135 135
136 scoped_refptr<base::SequencedTaskRunner> task_runner_; 136 scoped_refptr<base::SequencedTaskRunner> task_runner_;
137 TaskGraphRunner* task_graph_runner_; 137 TaskGraphRunner* task_graph_runner_;
138 const NamespaceToken namespace_token_; 138 const NamespaceToken namespace_token_;
139 TileTaskRunnerClient* client_; 139 TileTaskRunnerClient* client_;
140 ResourceProvider* const resource_provider_; 140 ResourceProvider* const resource_provider_;
141 const int max_bytes_per_copy_operation_; 141 const int max_bytes_per_copy_operation_;
142 const bool use_persistent_gpu_memory_buffers_; 142 const bool use_partial_raster_;
143 TaskSetCollection tasks_pending_; 143 TaskSetCollection tasks_pending_;
144 scoped_refptr<TileTask> task_set_finished_tasks_[kNumberOfTaskSets]; 144 scoped_refptr<TileTask> task_set_finished_tasks_[kNumberOfTaskSets];
145 145
146 // Task graph used when scheduling tasks and vector used to gather 146 // Task graph used when scheduling tasks and vector used to gather
147 // completed tasks. 147 // completed tasks.
148 TaskGraph graph_; 148 TaskGraph graph_;
149 Task::Vector completed_tasks_; 149 Task::Vector completed_tasks_;
150 150
151 mutable base::Lock lock_; 151 mutable base::Lock lock_;
152 // |lock_| must be acquired when accessing the following members. 152 // |lock_| must be acquired when accessing the following members.
(...skipping 16 matching lines...) Expand all
169 // canceled when ScheduleTasks() is called. 169 // canceled when ScheduleTasks() is called.
170 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> 170 base::WeakPtrFactory<OneCopyTileTaskWorkerPool>
171 task_set_finished_weak_ptr_factory_; 171 task_set_finished_weak_ptr_factory_;
172 172
173 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); 173 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool);
174 }; 174 };
175 175
176 } // namespace cc 176 } // namespace cc
177 177
178 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 178 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698