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

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

Issue 286953008: cc: Allow DeferredInitialize to use DelegatingRenderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 1826
1827 SetContentsScaleOnBothLayers(contents_scale, 1.f, page_scale, 1.f, false); 1827 SetContentsScaleOnBothLayers(contents_scale, 1.f, page_scale, 1.f, false);
1828 ASSERT_GE(pending_layer_->num_tilings(), 0u); 1828 ASSERT_GE(pending_layer_->num_tilings(), 0u);
1829 EXPECT_FLOAT_EQ(pending_layer_->MinimumContentsScale(), 1829 EXPECT_FLOAT_EQ(pending_layer_->MinimumContentsScale(),
1830 pending_layer_->HighResTiling()->contents_scale()); 1830 pending_layer_->HighResTiling()->contents_scale());
1831 } 1831 }
1832 1832
1833 class DeferredInitPictureLayerImplTest : public PictureLayerImplTest { 1833 class DeferredInitPictureLayerImplTest : public PictureLayerImplTest {
1834 public: 1834 public:
1835 virtual void InitializeRenderer() OVERRIDE { 1835 virtual void InitializeRenderer() OVERRIDE {
1836 host_impl_.InitializeRenderer(FakeOutputSurface::CreateDeferredGL( 1836 bool delegated_rendering = false;
1837 scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice)) 1837 host_impl_.InitializeRenderer(
1838 .PassAs<OutputSurface>()); 1838 FakeOutputSurface::CreateDeferredGL(
1839 scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice),
1840 delegated_rendering).PassAs<OutputSurface>());
1839 } 1841 }
1840 1842
1841 virtual void SetUp() OVERRIDE { 1843 virtual void SetUp() OVERRIDE {
1842 PictureLayerImplTest::SetUp(); 1844 PictureLayerImplTest::SetUp();
1843 1845
1844 // Create some default active and pending trees. 1846 // Create some default active and pending trees.
1845 gfx::Size tile_size(100, 100); 1847 gfx::Size tile_size(100, 100);
1846 gfx::Size layer_bounds(400, 400); 1848 gfx::Size layer_bounds(400, 400);
1847 1849
1848 scoped_refptr<FakePicturePileImpl> pending_pile = 1850 scoped_refptr<FakePicturePileImpl> pending_pile =
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 SetContentsScaleOnBothLayers(contents_scale, 2304 SetContentsScaleOnBothLayers(contents_scale,
2303 device_scale, 2305 device_scale,
2304 page_scale, 2306 page_scale,
2305 maximum_animation_scale, 2307 maximum_animation_scale,
2306 animating_transform); 2308 animating_transform);
2307 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f); 2309 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f);
2308 } 2310 }
2309 2311
2310 } // namespace 2312 } // namespace
2311 } // namespace cc 2313 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698