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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2566613002: [4/5] Add translated rasterization support for PictureLayerTilingSet & below (Closed)
Patch Set: still need that rebaseline Created 3 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 | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 11314 matching lines...) Expand 10 before | Expand all | Expand 10 after
11325 11325
11326 Region empty_invalidation; 11326 Region empty_invalidation;
11327 scoped_refptr<RasterSource> raster_source_with_tiles( 11327 scoped_refptr<RasterSource> raster_source_with_tiles(
11328 FakeRasterSource::CreateFilled(gfx::Size(10, 10))); 11328 FakeRasterSource::CreateFilled(gfx::Size(10, 10)));
11329 11329
11330 std::unique_ptr<FakePictureLayerImpl> layer = 11330 std::unique_ptr<FakePictureLayerImpl> layer =
11331 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11); 11331 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11);
11332 layer->SetBounds(gfx::Size(10, 10)); 11332 layer->SetBounds(gfx::Size(10, 10));
11333 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size()); 11333 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size());
11334 layer->SetDrawsContent(true); 11334 layer->SetDrawsContent(true);
11335 layer->tilings()->AddTiling(1.0f, raster_source_with_tiles); 11335 layer->tilings()->AddTiling(gfx::AxisTransform2d(), raster_source_with_tiles);
11336 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation, 11336 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation,
11337 nullptr); 11337 nullptr);
11338 layer->tilings()->tiling_at(0)->set_resolution( 11338 layer->tilings()->tiling_at(0)->set_resolution(
11339 TileResolution::HIGH_RESOLUTION); 11339 TileResolution::HIGH_RESOLUTION);
11340 layer->tilings()->tiling_at(0)->CreateAllTilesForTesting(); 11340 layer->tilings()->tiling_at(0)->CreateAllTilesForTesting();
11341 layer->tilings()->UpdateTilePriorities(gfx::Rect(gfx::Size(10, 10)), 1.f, 1.0, 11341 layer->tilings()->UpdateTilePriorities(gfx::Rect(gfx::Size(10, 10)), 1.f, 1.0,
11342 Occlusion(), true); 11342 Occlusion(), true);
11343 host_impl_->pending_tree()->SetRootLayerForTesting(std::move(layer)); 11343 host_impl_->pending_tree()->SetRootLayerForTesting(std::move(layer));
11344 11344
11345 FakePictureLayerImpl* root_layer = static_cast<FakePictureLayerImpl*>( 11345 FakePictureLayerImpl* root_layer = static_cast<FakePictureLayerImpl*>(
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
12296 else 12296 else
12297 EXPECT_FALSE(tile->HasRasterTask()); 12297 EXPECT_FALSE(tile->HasRasterTask());
12298 } 12298 }
12299 Region expected_invalidation( 12299 Region expected_invalidation(
12300 raster_source->GetRectForImage(checkerable_image->uniqueID())); 12300 raster_source->GetRectForImage(checkerable_image->uniqueID()));
12301 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); 12301 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation()));
12302 } 12302 }
12303 12303
12304 } // namespace 12304 } // namespace
12305 } // namespace cc 12305 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698