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

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: No call to self constructor in initializer 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/output/output_surface.h » ('j') | cc/test/fake_output_surface_client.h » ('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 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1908 1908
1909 SetContentsScaleOnBothLayers(contents_scale, 1.f, page_scale, 1.f, false); 1909 SetContentsScaleOnBothLayers(contents_scale, 1.f, page_scale, 1.f, false);
1910 ASSERT_GE(pending_layer_->num_tilings(), 0u); 1910 ASSERT_GE(pending_layer_->num_tilings(), 0u);
1911 EXPECT_FLOAT_EQ(pending_layer_->MinimumContentsScale(), 1911 EXPECT_FLOAT_EQ(pending_layer_->MinimumContentsScale(),
1912 pending_layer_->HighResTiling()->contents_scale()); 1912 pending_layer_->HighResTiling()->contents_scale());
1913 } 1913 }
1914 1914
1915 class DeferredInitPictureLayerImplTest : public PictureLayerImplTest { 1915 class DeferredInitPictureLayerImplTest : public PictureLayerImplTest {
1916 public: 1916 public:
1917 virtual void InitializeRenderer() OVERRIDE { 1917 virtual void InitializeRenderer() OVERRIDE {
1918 host_impl_.InitializeRenderer(FakeOutputSurface::CreateDeferredGL( 1918 bool delegated_rendering = false;
1919 scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice)) 1919 host_impl_.InitializeRenderer(
1920 .PassAs<OutputSurface>()); 1920 FakeOutputSurface::CreateDeferredGL(
1921 scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice),
1922 delegated_rendering).PassAs<OutputSurface>());
1921 } 1923 }
1922 1924
1923 virtual void SetUp() OVERRIDE { 1925 virtual void SetUp() OVERRIDE {
1924 PictureLayerImplTest::SetUp(); 1926 PictureLayerImplTest::SetUp();
1925 1927
1926 // Create some default active and pending trees. 1928 // Create some default active and pending trees.
1927 gfx::Size tile_size(100, 100); 1929 gfx::Size tile_size(100, 100);
1928 gfx::Size layer_bounds(400, 400); 1930 gfx::Size layer_bounds(400, 400);
1929 1931
1930 scoped_refptr<FakePicturePileImpl> pending_pile = 1932 scoped_refptr<FakePicturePileImpl> pending_pile =
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 SetContentsScaleOnBothLayers(contents_scale, 2386 SetContentsScaleOnBothLayers(contents_scale,
2385 device_scale, 2387 device_scale,
2386 page_scale, 2388 page_scale,
2387 maximum_animation_scale, 2389 maximum_animation_scale,
2388 animating_transform); 2390 animating_transform);
2389 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f); 2391 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f);
2390 } 2392 }
2391 2393
2392 } // namespace 2394 } // namespace
2393 } // namespace cc 2395 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/output_surface.h » ('j') | cc/test/fake_output_surface_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698