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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 2784683002: cc: remove the veto-to-software for complex content. (Closed)
Patch Set: Remove GpuRasterizationStatus::OFF_CONTENT entirely. 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 EXPECT_EQ(GpuRasterizationStatus::OFF_VIEWPORT, 2326 EXPECT_EQ(GpuRasterizationStatus::OFF_VIEWPORT,
2327 host_impl()->gpu_rasterization_status()); 2327 host_impl()->gpu_rasterization_status());
2328 EXPECT_EQ(2u, pending_layer()->release_tile_resources_count()); 2328 EXPECT_EQ(2u, pending_layer()->release_tile_resources_count());
2329 EXPECT_EQ(2u, active_layer()->release_tile_resources_count()); 2329 EXPECT_EQ(2u, active_layer()->release_tile_resources_count());
2330 EXPECT_EQ(2u, pending_layer()->release_resources_count()); 2330 EXPECT_EQ(2u, pending_layer()->release_resources_count());
2331 EXPECT_EQ(2u, active_layer()->release_resources_count()); 2331 EXPECT_EQ(2u, active_layer()->release_resources_count());
2332 2332
2333 host_impl()->SetHasGpuRasterizationTrigger(true); 2333 host_impl()->SetHasGpuRasterizationTrigger(true);
2334 host_impl()->SetContentIsSuitableForGpuRasterization(false); 2334 host_impl()->SetContentIsSuitableForGpuRasterization(false);
2335 host_impl()->CommitComplete(); 2335 host_impl()->CommitComplete();
2336 EXPECT_EQ(GpuRasterizationStatus::OFF_CONTENT, 2336 EXPECT_EQ(GpuRasterizationStatus::ON,
2337 host_impl()->gpu_rasterization_status()); 2337 host_impl()->gpu_rasterization_status());
2338 } 2338 }
2339 2339
2340 TEST_F(PictureLayerImplTest, HighResCreatedWhenBoundsShrink) { 2340 TEST_F(PictureLayerImplTest, HighResCreatedWhenBoundsShrink) {
2341 // Put 0.5 as high res. 2341 // Put 0.5 as high res.
2342 SetInitialDeviceScaleFactor(0.5f); 2342 SetInitialDeviceScaleFactor(0.5f);
2343 2343
2344 scoped_refptr<FakeRasterSource> pending_raster_source = 2344 scoped_refptr<FakeRasterSource> pending_raster_source =
2345 FakeRasterSource::CreateFilled(gfx::Size(10, 10)); 2345 FakeRasterSource::CreateFilled(gfx::Size(10, 10));
2346 SetupPendingTree(pending_raster_source); 2346 SetupPendingTree(pending_raster_source);
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
4942 EXPECT_FLOAT_EQ(expected_contents_scale, 4942 EXPECT_FLOAT_EQ(expected_contents_scale,
4943 pending_layer_ptr->picture_layer_tiling_set() 4943 pending_layer_ptr->picture_layer_tiling_set()
4944 ->FindTilingWithResolution(HIGH_RESOLUTION) 4944 ->FindTilingWithResolution(HIGH_RESOLUTION)
4945 ->contents_scale()) 4945 ->contents_scale())
4946 << "ideal_contents_scale: " << ideal_contents_scale; 4946 << "ideal_contents_scale: " << ideal_contents_scale;
4947 } 4947 }
4948 } 4948 }
4949 4949
4950 } // namespace 4950 } // namespace
4951 } // namespace cc 4951 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698