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

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

Issue 1102133002: cc: Initialize test code tree variable in fake tiling client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | 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 <limits> 7 #include <limits>
8 8
9 #include "cc/test/fake_picture_pile_impl.h" 9 #include "cc/test/fake_picture_pile_impl.h"
10 #include "cc/test/fake_tile_manager.h" 10 #include "cc/test/fake_tile_manager.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 FakePictureLayerTilingClient::FakePictureLayerTilingClient() 14 FakePictureLayerTilingClient::FakePictureLayerTilingClient()
15 : tile_manager_(new FakeTileManager(&tile_manager_client_)), 15 : tile_manager_(new FakeTileManager(&tile_manager_client_)),
16 pile_(FakePicturePileImpl::CreateInfiniteFilledPile()), 16 pile_(FakePicturePileImpl::CreateInfiniteFilledPile()),
17 twin_set_(nullptr), 17 twin_set_(nullptr),
18 twin_tiling_(nullptr), 18 twin_tiling_(nullptr),
19 recycled_twin_tiling_(nullptr), 19 recycled_twin_tiling_(nullptr),
20 max_tile_priority_bin_(TilePriority::NOW) { 20 max_tile_priority_bin_(TilePriority::NOW),
21 tree_(ACTIVE_TREE) {
21 } 22 }
22 23
23 FakePictureLayerTilingClient::FakePictureLayerTilingClient( 24 FakePictureLayerTilingClient::FakePictureLayerTilingClient(
24 ResourceProvider* resource_provider) 25 ResourceProvider* resource_provider)
25 : resource_pool_( 26 : resource_pool_(ResourcePool::Create(resource_provider, GL_TEXTURE_2D)),
26 ResourcePool::Create(resource_provider, GL_TEXTURE_2D)), 27 tile_manager_(
27 tile_manager_(new FakeTileManager( 28 new FakeTileManager(&tile_manager_client_, resource_pool_.get())),
28 &tile_manager_client_, resource_pool_.get())),
29 pile_(FakePicturePileImpl::CreateInfiniteFilledPile()), 29 pile_(FakePicturePileImpl::CreateInfiniteFilledPile()),
30 twin_set_(nullptr), 30 twin_set_(nullptr),
31 twin_tiling_(nullptr), 31 twin_tiling_(nullptr),
32 recycled_twin_tiling_(nullptr), 32 recycled_twin_tiling_(nullptr),
33 max_tile_priority_bin_(TilePriority::NOW) { 33 max_tile_priority_bin_(TilePriority::NOW),
34 tree_(ACTIVE_TREE) {
34 } 35 }
35 36
36 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { 37 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
37 } 38 }
38 39
39 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( 40 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
40 float content_scale, 41 float content_scale,
41 const gfx::Rect& rect) { 42 const gfx::Rect& rect) {
42 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0); 43 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0);
43 } 44 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 80
80 WhichTree FakePictureLayerTilingClient::GetTree() const { 81 WhichTree FakePictureLayerTilingClient::GetTree() const {
81 return tree_; 82 return tree_;
82 } 83 }
83 84
84 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { 85 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const {
85 return false; 86 return false;
86 } 87 }
87 88
88 } // namespace cc 89 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698