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

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: slightlylessstruct 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"
reveman 2015/05/28 05:07:25 don't think you need this anymore
danakj 2015/05/28 18:54:47 Done.
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 {
reveman 2015/05/28 05:07:24 not a fan of things named "data", "info", etc. can
danakj 2015/05/28 18:54:47 I can. Every time we add a new parameter it requir
23 TileTaskData(const Resource* resource,
24 uint64_t new_content_id,
25 uint64_t previous_content_id)
26 : resource(resource),
27 new_content_id(new_content_id),
28 previous_content_id(previous_content_id) {}
29
30 const Resource* resource;
31 uint64_t new_content_id;
32 uint64_t previous_content_id;
33 };
34
21 class CC_EXPORT TileTaskClient { 35 class CC_EXPORT TileTaskClient {
22 public: 36 public:
23 virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster( 37 virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
24 const Resource* resource) = 0; 38 const TileTaskData& data) = 0;
25 virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) = 0; 39 virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) = 0;
reveman 2015/05/28 05:07:25 Discussed this with Vlad and I think there are som
danakj 2015/05/28 18:54:47 This doesn't work. Tile manager doesn't know if th
reveman 2015/05/29 14:50:26 The whole point of the interface suggestion above
26 40
27 protected: 41 protected:
28 virtual ~TileTaskClient() {} 42 virtual ~TileTaskClient() {}
29 }; 43 };
30 44
31 class CC_EXPORT TileTask : public Task { 45 class CC_EXPORT TileTask : public Task {
32 public: 46 public:
33 typedef std::vector<scoped_refptr<TileTask>> Vector; 47 typedef std::vector<scoped_refptr<TileTask>> Vector;
34 48
35 virtual void ScheduleOnOriginThread(TileTaskClient* client) = 0; 49 virtual void ScheduleOnOriginThread(TileTaskClient* client) = 0;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Returns the format to use for the tiles. 177 // Returns the format to use for the tiles.
164 virtual ResourceFormat GetResourceFormat() = 0; 178 virtual ResourceFormat GetResourceFormat() = 0;
165 179
166 protected: 180 protected:
167 virtual ~TileTaskRunner() {} 181 virtual ~TileTaskRunner() {}
168 }; 182 };
169 183
170 } // namespace cc 184 } // namespace cc
171 185
172 #endif // CC_RASTER_TILE_TASK_RUNNER_H_ 186 #endif // CC_RASTER_TILE_TASK_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698