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

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

Issue 1939963002: cc: Move prepaint region calculations to the tiling set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_settings.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 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 10075 matching lines...) Expand 10 before | Expand all | Expand 10 after
10086 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11); 10086 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11);
10087 layer->SetBounds(gfx::Size(10, 10)); 10087 layer->SetBounds(gfx::Size(10, 10));
10088 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size()); 10088 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size());
10089 layer->SetDrawsContent(true); 10089 layer->SetDrawsContent(true);
10090 layer->tilings()->AddTiling(1.0f, raster_source_with_tiles); 10090 layer->tilings()->AddTiling(1.0f, raster_source_with_tiles);
10091 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation, 10091 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation,
10092 nullptr); 10092 nullptr);
10093 layer->tilings()->tiling_at(0)->set_resolution( 10093 layer->tilings()->tiling_at(0)->set_resolution(
10094 TileResolution::HIGH_RESOLUTION); 10094 TileResolution::HIGH_RESOLUTION);
10095 layer->tilings()->tiling_at(0)->CreateAllTilesForTesting(); 10095 layer->tilings()->tiling_at(0)->CreateAllTilesForTesting();
10096 layer->tilings()->tiling_at(0)->ComputeTilePriorityRects( 10096 layer->tilings()->UpdateTilePriorities(gfx::Rect(gfx::Size(10, 10)), 1.f, 1.0,
10097 gfx::Rect(gfx::Size(10, 10)), 1.f, 1.0, Occlusion()); 10097 Occlusion(), true);
10098 host_impl_->pending_tree()->SetRootLayer(std::move(layer)); 10098 host_impl_->pending_tree()->SetRootLayer(std::move(layer));
10099 10099
10100 FakePictureLayerImpl* root_layer = static_cast<FakePictureLayerImpl*>( 10100 FakePictureLayerImpl* root_layer = static_cast<FakePictureLayerImpl*>(
10101 host_impl_->pending_tree()->root_layer()); 10101 host_impl_->pending_tree()->root_layer());
10102 10102
10103 root_layer->set_has_valid_tile_priorities(true); 10103 root_layer->set_has_valid_tile_priorities(true);
10104 std::unique_ptr<RasterTilePriorityQueue> non_empty_raster_priority_queue_all = 10104 std::unique_ptr<RasterTilePriorityQueue> non_empty_raster_priority_queue_all =
10105 host_impl_->BuildRasterQueue(TreePriority::SAME_PRIORITY_FOR_BOTH_TREES, 10105 host_impl_->BuildRasterQueue(TreePriority::SAME_PRIORITY_FOR_BOTH_TREES,
10106 RasterTilePriorityQueue::Type::ALL); 10106 RasterTilePriorityQueue::Type::ALL);
10107 EXPECT_FALSE(non_empty_raster_priority_queue_all->IsEmpty()); 10107 EXPECT_FALSE(non_empty_raster_priority_queue_all->IsEmpty());
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
10705 10705
10706 // Re-initialize with a software output surface. 10706 // Re-initialize with a software output surface.
10707 output_surface_ = FakeOutputSurface::CreateSoftware( 10707 output_surface_ = FakeOutputSurface::CreateSoftware(
10708 base::WrapUnique(new SoftwareOutputDevice)); 10708 base::WrapUnique(new SoftwareOutputDevice));
10709 host_impl_->InitializeRenderer(output_surface_.get()); 10709 host_impl_->InitializeRenderer(output_surface_.get());
10710 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); 10710 EXPECT_FALSE(host_impl_->use_gpu_rasterization());
10711 } 10711 }
10712 10712
10713 } // namespace 10713 } // namespace
10714 } // namespace cc 10714 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698