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

Side by Side Diff: cc/tiles/tile_manager.h

Issue 1405883002: cc: Remove the base RasterSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge more 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 | « cc/tiles/prioritized_tile.cc ('k') | cc/tiles/tile_manager.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_TILES_TILE_MANAGER_H_ 5 #ifndef CC_TILES_TILE_MANAGER_H_
6 #define CC_TILES_TILE_MANAGER_H_ 6 #define CC_TILES_TILE_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "cc/base/unique_notifier.h" 17 #include "cc/base/unique_notifier.h"
18 #include "cc/playback/raster_source.h" 18 #include "cc/playback/display_list_raster_source.h"
19 #include "cc/raster/tile_task_runner.h" 19 #include "cc/raster/tile_task_runner.h"
20 #include "cc/resources/memory_history.h" 20 #include "cc/resources/memory_history.h"
21 #include "cc/resources/resource_pool.h" 21 #include "cc/resources/resource_pool.h"
22 #include "cc/tiles/eviction_tile_priority_queue.h" 22 #include "cc/tiles/eviction_tile_priority_queue.h"
23 #include "cc/tiles/image_decode_controller.h" 23 #include "cc/tiles/image_decode_controller.h"
24 #include "cc/tiles/raster_tile_priority_queue.h" 24 #include "cc/tiles/raster_tile_priority_queue.h"
25 #include "cc/tiles/tile.h" 25 #include "cc/tiles/tile.h"
26 #include "cc/tiles/tile_draw_info.h" 26 #include "cc/tiles/tile_draw_info.h"
27 27
28 namespace base { 28 namespace base {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 MemoryUsage operator-(const MemoryUsage& other); 244 MemoryUsage operator-(const MemoryUsage& other);
245 245
246 bool Exceeds(const MemoryUsage& limit) const; 246 bool Exceeds(const MemoryUsage& limit) const;
247 int64 memory_bytes() const { return memory_bytes_; } 247 int64 memory_bytes() const { return memory_bytes_; }
248 248
249 private: 249 private:
250 int64 memory_bytes_; 250 int64 memory_bytes_;
251 int resource_count_; 251 int resource_count_;
252 }; 252 };
253 253
254 void OnRasterTaskCompleted(Tile::Id tile, 254 void OnRasterTaskCompleted(
255 Resource* resource, 255 Tile::Id tile,
256 const RasterSource::SolidColorAnalysis& analysis, 256 Resource* resource,
257 bool was_canceled); 257 const DisplayListRasterSource::SolidColorAnalysis& analysis,
258 void UpdateTileDrawInfo(Tile* tile, 258 bool was_canceled);
259 Resource* resource, 259 void UpdateTileDrawInfo(
260 const RasterSource::SolidColorAnalysis& analysis); 260 Tile* tile,
261 Resource* resource,
262 const DisplayListRasterSource::SolidColorAnalysis& analysis);
261 263
262 void FreeResourcesForTile(Tile* tile); 264 void FreeResourcesForTile(Tile* tile);
263 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile); 265 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile);
264 scoped_refptr<RasterTask> CreateRasterTask( 266 scoped_refptr<RasterTask> CreateRasterTask(
265 const PrioritizedTile& prioritized_tile); 267 const PrioritizedTile& prioritized_tile);
266 268
267 scoped_ptr<EvictionTilePriorityQueue> 269 scoped_ptr<EvictionTilePriorityQueue>
268 FreeTileResourcesUntilUsageIsWithinLimit( 270 FreeTileResourcesUntilUsageIsWithinLimit(
269 scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue, 271 scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
270 const MemoryUsage& limit, 272 const MemoryUsage& limit,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 333
332 uint64_t prepare_tiles_count_; 334 uint64_t prepare_tiles_count_;
333 uint64_t next_tile_id_; 335 uint64_t next_tile_id_;
334 336
335 DISALLOW_COPY_AND_ASSIGN(TileManager); 337 DISALLOW_COPY_AND_ASSIGN(TileManager);
336 }; 338 };
337 339
338 } // namespace cc 340 } // namespace cc
339 341
340 #endif // CC_TILES_TILE_MANAGER_H_ 342 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/tiles/prioritized_tile.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698