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

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

Issue 2726263003: cc::ResourcePool - Re-use larger resources for smaller requests (Closed)
Patch Set: fix compile Created 3 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
« no previous file with comments | « cc/resources/resource_pool_unittest.cc ('k') | cc/test/layer_tree_pixel_resource_test.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 #include "cc/test/fake_picture_layer_tiling_client.h" 5 #include "cc/test/fake_picture_layer_tiling_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
11 #include "base/threading/thread_task_runner_handle.h" 11 #include "base/threading/thread_task_runner_handle.h"
12 #include "cc/test/fake_raster_source.h" 12 #include "cc/test/fake_raster_source.h"
13 #include "cc/test/fake_tile_manager.h" 13 #include "cc/test/fake_tile_manager.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 FakePictureLayerTilingClient::FakePictureLayerTilingClient() 17 FakePictureLayerTilingClient::FakePictureLayerTilingClient()
18 : tile_manager_(new FakeTileManager(&tile_manager_client_)), 18 : tile_manager_(new FakeTileManager(&tile_manager_client_)),
19 raster_source_(FakeRasterSource::CreateInfiniteFilled()), 19 raster_source_(FakeRasterSource::CreateInfiniteFilled()),
20 twin_set_(nullptr), 20 twin_set_(nullptr),
21 twin_tiling_(nullptr), 21 twin_tiling_(nullptr),
22 has_valid_tile_priorities_(true) {} 22 has_valid_tile_priorities_(true) {}
23 23
24 FakePictureLayerTilingClient::FakePictureLayerTilingClient( 24 FakePictureLayerTilingClient::FakePictureLayerTilingClient(
25 ResourceProvider* resource_provider) 25 ResourceProvider* resource_provider)
26 : resource_pool_( 26 : resource_pool_(
27 ResourcePool::Create(resource_provider, 27 ResourcePool::Create(resource_provider,
28 base::ThreadTaskRunnerHandle::Get().get(), 28 base::ThreadTaskRunnerHandle::Get().get(),
29 ResourceProvider::TEXTURE_HINT_IMMUTABLE, 29 ResourceProvider::TEXTURE_HINT_IMMUTABLE,
30 ResourcePool::kDefaultExpirationDelay)), 30 ResourcePool::kDefaultExpirationDelay,
31 false)),
31 tile_manager_( 32 tile_manager_(
32 new FakeTileManager(&tile_manager_client_, resource_pool_.get())), 33 new FakeTileManager(&tile_manager_client_, resource_pool_.get())),
33 raster_source_(FakeRasterSource::CreateInfiniteFilled()), 34 raster_source_(FakeRasterSource::CreateInfiniteFilled()),
34 twin_set_(nullptr), 35 twin_set_(nullptr),
35 twin_tiling_(nullptr), 36 twin_tiling_(nullptr),
36 has_valid_tile_priorities_(true) {} 37 has_valid_tile_priorities_(true) {}
37 38
38 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { 39 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
39 } 40 }
40 41
(...skipping 30 matching lines...) Expand all
71 return twin_set_->tiling_at(i); 72 return twin_set_->tiling_at(i);
72 } 73 }
73 return nullptr; 74 return nullptr;
74 } 75 }
75 76
76 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { 77 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const {
77 return false; 78 return false;
78 } 79 }
79 80
80 } // namespace cc 81 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_pool_unittest.cc ('k') | cc/test/layer_tree_pixel_resource_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698