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

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

Issue 1139063002: cc: Partial tile update for one-copy raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: monocle: tilemanagerconsistency Created 5 years, 7 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_RASTER_TILE_TASK_RUNNER_H_ 5 #ifndef CC_RASTER_TILE_TASK_RUNNER_H_
6 #define CC_RASTER_TILE_TASK_RUNNER_H_ 6 #define CC_RASTER_TILE_TASK_RUNNER_H_
7 7
8 #include <bitset> 8 #include <bitset>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "cc/raster/task_graph_runner.h" 12 #include "cc/raster/task_graph_runner.h"
13 #include "cc/resources/resource_format.h" 13 #include "cc/resources/resource_format.h"
14 #include "ui/gfx/geometry/rect.h"
14 15
15 namespace cc { 16 namespace cc {
16 class ImageDecodeTask; 17 class ImageDecodeTask;
17 class RasterTask; 18 class RasterTask;
18 class Resource; 19 class Resource;
19 class RasterBuffer; 20 class RasterBuffer;
20 21
22 struct TileTaskData {
23 TileTaskData(const Resource* resource,
24 uint64_t new_tile_id,
25 uint64_t previous_tile_id,
26 const gfx::Rect& raster_dirty_rect)
27 : resource(resource),
28 new_tile_id(new_tile_id),
29 previous_tile_id(previous_tile_id),
30 raster_dirty_rect(raster_dirty_rect) {}
31
32 const Resource* resource;
33 uint64_t new_tile_id;
34 uint64_t previous_tile_id;
35 gfx::Rect raster_dirty_rect;
36 };
reveman 2015/05/22 17:15:13 If I understand this correctly, here's how this wo
danakj 2015/05/26 19:02:52 Correct.
reveman 2015/05/26 20:12:37 I was thinking the cc::Resource class and not the
37
21 class CC_EXPORT TileTaskClient { 38 class CC_EXPORT TileTaskClient {
22 public: 39 public:
23 virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster( 40 virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
24 const Resource* resource) = 0; 41 const TileTaskData& data) = 0;
25 virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) = 0; 42 virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) = 0;
26 43
27 protected: 44 protected:
28 virtual ~TileTaskClient() {} 45 virtual ~TileTaskClient() {}
29 }; 46 };
30 47
31 class CC_EXPORT TileTask : public Task { 48 class CC_EXPORT TileTask : public Task {
32 public: 49 public:
33 typedef std::vector<scoped_refptr<TileTask>> Vector; 50 typedef std::vector<scoped_refptr<TileTask>> Vector;
34 51
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Returns the format to use for the tiles. 180 // Returns the format to use for the tiles.
164 virtual ResourceFormat GetResourceFormat() = 0; 181 virtual ResourceFormat GetResourceFormat() = 0;
165 182
166 protected: 183 protected:
167 virtual ~TileTaskRunner() {} 184 virtual ~TileTaskRunner() {}
168 }; 185 };
169 186
170 } // namespace cc 187 } // namespace cc
171 188
172 #endif // CC_RASTER_TILE_TASK_RUNNER_H_ 189 #endif // CC_RASTER_TILE_TASK_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698