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

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

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip - fixed few unit tests Created 4 years, 8 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 #ifndef CC_RASTER_TILE_TASK_WORKER_POOL_H_ 5 #ifndef CC_RASTER_TILE_TASK_WORKER_POOL_H_
6 #define CC_RASTER_TILE_TASK_WORKER_POOL_H_ 6 #define CC_RASTER_TILE_TASK_WORKER_POOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "cc/playback/raster_source.h" 10 #include "cc/playback/raster_source.h"
11 #include "cc/raster/tile_task_runner.h" 11 #include "cc/raster/tile_task_runner.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 14
15 namespace base { 15 namespace base {
16 class SequencedTaskRunner; 16 class SequencedTaskRunner;
17 } 17 }
18 18
19 namespace cc { 19 namespace cc {
20 class RenderingStatsInstrumentation; 20 class RenderingStatsInstrumentation;
21 21
22 class CC_EXPORT TileTaskWorkerPool { 22 class CC_EXPORT TileTaskWorkerPool {
23 public: 23 public:
24 TileTaskWorkerPool(); 24 TileTaskWorkerPool();
25 virtual ~TileTaskWorkerPool(); 25 virtual ~TileTaskWorkerPool();
26 26
27 // Utility function that can be used to call ::ScheduleOnOriginThread() for
28 // each task in |graph|.
29 static void ScheduleTasksOnOriginThread(TileTaskClient* client,
30 TaskGraph* graph);
31
32 // Utility function that will create a temporary bitmap and copy pixels to 27 // Utility function that will create a temporary bitmap and copy pixels to
33 // |memory| when necessary. The |canvas_bitmap_rect| is the rect of the bitmap 28 // |memory| when necessary. The |canvas_bitmap_rect| is the rect of the bitmap
34 // being played back in the pixel space of the source, ie a rect in the source 29 // being played back in the pixel space of the source, ie a rect in the source
35 // that will cover the resulting |memory|. The |canvas_playback_rect| can be a 30 // that will cover the resulting |memory|. The |canvas_playback_rect| can be a
36 // smaller contained rect inside the |canvas_bitmap_rect| if the |memory| is 31 // smaller contained rect inside the |canvas_bitmap_rect| if the |memory| is
37 // already partially complete, and only the subrect needs to be played back. 32 // already partially complete, and only the subrect needs to be played back.
38 static void PlaybackToMemory( 33 static void PlaybackToMemory(
39 void* memory, 34 void* memory,
40 ResourceFormat format, 35 ResourceFormat format,
41 const gfx::Size& size, 36 const gfx::Size& size,
42 size_t stride, 37 size_t stride,
43 const RasterSource* raster_source, 38 const RasterSource* raster_source,
44 const gfx::Rect& canvas_bitmap_rect, 39 const gfx::Rect& canvas_bitmap_rect,
45 const gfx::Rect& canvas_playback_rect, 40 const gfx::Rect& canvas_playback_rect,
46 float scale, 41 float scale,
47 const RasterSource::PlaybackSettings& playback_settings); 42 const RasterSource::PlaybackSettings& playback_settings);
48 43
49 // Type-checking downcast routine. 44 // Type-checking downcast routine.
50 virtual TileTaskRunner* AsTileTaskRunner() = 0; 45 virtual TileTaskRunner* AsTileTaskRunner() = 0;
51 }; 46 };
52 47
53 } // namespace cc 48 } // namespace cc
54 49
55 #endif // CC_RASTER_TILE_TASK_WORKER_POOL_H_ 50 #endif // CC_RASTER_TILE_TASK_WORKER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698