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

Side by Side Diff: cc/test/fake_tile_manager.cc

Issue 2668873002: cc: Add checker-imaging support to TileManager. (Closed)
Patch Set: remove include Created 3 years, 10 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/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/fake_tile_manager_client.h » ('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 #include "cc/test/fake_tile_manager.h" 5 #include "cc/test/fake_tile_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 18 matching lines...) Expand all
29 LAZY_INSTANCE_INITIALIZER; 29 LAZY_INSTANCE_INITIALIZER;
30 30
31 } // namespace 31 } // namespace
32 32
33 FakeTileManager::FakeTileManager(TileManagerClient* client, 33 FakeTileManager::FakeTileManager(TileManagerClient* client,
34 ResourcePool* resource_pool) 34 ResourcePool* resource_pool)
35 : TileManager(client, 35 : TileManager(client,
36 base::ThreadTaskRunnerHandle::Get().get(), 36 base::ThreadTaskRunnerHandle::Get().get(),
37 nullptr, 37 nullptr,
38 std::numeric_limits<size_t>::max(), 38 std::numeric_limits<size_t>::max(),
39 false /* use_partial_raster */, 39 TileManagerSettings()),
40 false /* check_tile_priority_inversion */),
41 image_decode_cache_( 40 image_decode_cache_(
42 ResourceFormat::RGBA_8888, 41 ResourceFormat::RGBA_8888,
43 LayerTreeSettings().software_decoded_image_budget_bytes) { 42 LayerTreeSettings().software_decoded_image_budget_bytes) {
44 SetDecodedImageTracker(&decoded_image_tracker_); 43 SetDecodedImageTracker(&decoded_image_tracker_);
45 SetResources(resource_pool, &image_decode_cache_, 44 SetResources(resource_pool, &image_decode_cache_,
46 g_synchronous_task_graph_runner.Pointer(), 45 g_synchronous_task_graph_runner.Pointer(),
47 g_fake_raster_buffer_provider.Pointer(), 46 g_fake_raster_buffer_provider.Pointer(),
48 std::numeric_limits<size_t>::max(), 47 std::numeric_limits<size_t>::max(),
49 false /* use_gpu_rasterization */); 48 false /* use_gpu_rasterization */);
50 SetTileTaskManagerForTesting(base::MakeUnique<FakeTileTaskManagerImpl>()); 49 SetTileTaskManagerForTesting(base::MakeUnique<FakeTileTaskManagerImpl>());
51 } 50 }
52 51
53 FakeTileManager::~FakeTileManager() {} 52 FakeTileManager::~FakeTileManager() {}
54 53
55 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { 54 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) {
56 return std::find(tiles_for_raster.begin(), 55 return std::find(tiles_for_raster.begin(),
57 tiles_for_raster.end(), 56 tiles_for_raster.end(),
58 tile) != tiles_for_raster.end(); 57 tile) != tiles_for_raster.end();
59 } 58 }
60 59
61 } // namespace cc 60 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/fake_tile_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698