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

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

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/image_copy_raster_worker_pool.cc ('k') | cc/resources/image_raster_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 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 #ifndef CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ 5 #ifndef CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
6 #define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ 6 #define CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/resources/raster_worker_pool.h" 10 #include "cc/resources/raster_worker_pool.h"
11 #include "cc/resources/rasterizer.h" 11 #include "cc/resources/rasterizer.h"
12 12
13 namespace base {
14 namespace debug {
15 class ConvertableToTraceFormat;
16 }
17 }
18
13 namespace cc { 19 namespace cc {
14 class ResourceProvider; 20 class ResourceProvider;
15 21
16 class CC_EXPORT ImageRasterWorkerPool : public RasterWorkerPool, 22 class CC_EXPORT ImageRasterWorkerPool : public RasterWorkerPool,
17 public Rasterizer, 23 public Rasterizer,
18 public RasterizerTaskClient { 24 public RasterizerTaskClient {
19 public: 25 public:
20 virtual ~ImageRasterWorkerPool(); 26 virtual ~ImageRasterWorkerPool();
21 27
22 static scoped_ptr<RasterWorkerPool> Create( 28 static scoped_ptr<RasterWorkerPool> Create(
(...skipping 15 matching lines...) Expand all
38 virtual void ReleaseCanvasForRaster(RasterTask* task) OVERRIDE; 44 virtual void ReleaseCanvasForRaster(RasterTask* task) OVERRIDE;
39 45
40 protected: 46 protected:
41 ImageRasterWorkerPool(base::SequencedTaskRunner* task_runner, 47 ImageRasterWorkerPool(base::SequencedTaskRunner* task_runner,
42 TaskGraphRunner* task_graph_runner, 48 TaskGraphRunner* task_graph_runner,
43 ResourceProvider* resource_provider); 49 ResourceProvider* resource_provider);
44 50
45 private: 51 private:
46 void OnRasterFinished(); 52 void OnRasterFinished();
47 void OnRasterRequiredForActivationFinished(); 53 void OnRasterRequiredForActivationFinished();
48 scoped_ptr<base::Value> StateAsValue() const; 54 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const;
49 55
50 scoped_refptr<base::SequencedTaskRunner> task_runner_; 56 scoped_refptr<base::SequencedTaskRunner> task_runner_;
51 TaskGraphRunner* task_graph_runner_; 57 TaskGraphRunner* task_graph_runner_;
52 const NamespaceToken namespace_token_; 58 const NamespaceToken namespace_token_;
53 RasterizerClient* client_; 59 RasterizerClient* client_;
54 ResourceProvider* resource_provider_; 60 ResourceProvider* resource_provider_;
55 61
56 bool raster_tasks_pending_; 62 bool raster_tasks_pending_;
57 bool raster_tasks_required_for_activation_pending_; 63 bool raster_tasks_required_for_activation_pending_;
58 64
59 base::WeakPtrFactory<ImageRasterWorkerPool> raster_finished_weak_ptr_factory_; 65 base::WeakPtrFactory<ImageRasterWorkerPool> raster_finished_weak_ptr_factory_;
60 66
61 scoped_refptr<RasterizerTask> raster_finished_task_; 67 scoped_refptr<RasterizerTask> raster_finished_task_;
62 scoped_refptr<RasterizerTask> raster_required_for_activation_finished_task_; 68 scoped_refptr<RasterizerTask> raster_required_for_activation_finished_task_;
63 69
64 // Task graph used when scheduling tasks and vector used to gather 70 // Task graph used when scheduling tasks and vector used to gather
65 // completed tasks. 71 // completed tasks.
66 TaskGraph graph_; 72 TaskGraph graph_;
67 Task::Vector completed_tasks_; 73 Task::Vector completed_tasks_;
68 74
69 DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool); 75 DISALLOW_COPY_AND_ASSIGN(ImageRasterWorkerPool);
70 }; 76 };
71 77
72 } // namespace cc 78 } // namespace cc
73 79
74 #endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_ 80 #endif // CC_RESOURCES_IMAGE_RASTER_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « cc/resources/image_copy_raster_worker_pool.cc ('k') | cc/resources/image_raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698