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

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

Issue 1356463002: Revert of cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | cc/layers/heads_up_display_layer_impl_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/delegated_renderer_layer_impl.h" 5 #include "cc/layers/delegated_renderer_layer_impl.h"
6 6
7 #include "cc/base/scoped_ptr_vector.h" 7 #include "cc/base/scoped_ptr_vector.h"
8 #include "cc/layers/solid_color_layer_impl.h" 8 #include "cc/layers/solid_color_layer_impl.h"
9 #include "cc/quads/render_pass_draw_quad.h" 9 #include "cc/quads/render_pass_draw_quad.h"
10 #include "cc/quads/solid_color_draw_quad.h" 10 #include "cc/quads/solid_color_draw_quad.h"
(...skipping 14 matching lines...) Expand all
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 #include "ui/gfx/transform.h" 26 #include "ui/gfx/transform.h"
27 27
28 namespace cc { 28 namespace cc {
29 namespace { 29 namespace {
30 30
31 class DelegatedRendererLayerImplTest : public testing::Test { 31 class DelegatedRendererLayerImplTest : public testing::Test {
32 public: 32 public:
33 DelegatedRendererLayerImplTest() 33 DelegatedRendererLayerImplTest()
34 : proxy_(), 34 : proxy_(),
35 always_impl_thread_and_main_thread_blocked_(&proxy_), 35 always_impl_thread_and_main_thread_blocked_(&proxy_) {
36 output_surface_(FakeOutputSurface::Create3d()) {
37 LayerTreeSettings settings; 36 LayerTreeSettings settings;
38 settings.minimum_occlusion_tracking_size = gfx::Size(); 37 settings.minimum_occlusion_tracking_size = gfx::Size();
39 38
40 host_impl_.reset(new FakeLayerTreeHostImpl( 39 host_impl_.reset(new FakeLayerTreeHostImpl(
41 settings, &proxy_, &shared_bitmap_manager_, &task_graph_runner_)); 40 settings, &proxy_, &shared_bitmap_manager_, &task_graph_runner_));
42 host_impl_->InitializeRenderer(output_surface_.get()); 41 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d());
43 host_impl_->SetViewportSize(gfx::Size(10, 10)); 42 host_impl_->SetViewportSize(gfx::Size(10, 10));
44 } 43 }
45 44
46 protected: 45 protected:
47 FakeImplProxy proxy_; 46 FakeImplProxy proxy_;
48 DebugScopedSetImplThreadAndMainThreadBlocked 47 DebugScopedSetImplThreadAndMainThreadBlocked
49 always_impl_thread_and_main_thread_blocked_; 48 always_impl_thread_and_main_thread_blocked_;
50 TestSharedBitmapManager shared_bitmap_manager_; 49 TestSharedBitmapManager shared_bitmap_manager_;
51 TestTaskGraphRunner task_graph_runner_; 50 TestTaskGraphRunner task_graph_runner_;
52 scoped_ptr<OutputSurface> output_surface_;
53 scoped_ptr<LayerTreeHostImpl> host_impl_; 51 scoped_ptr<LayerTreeHostImpl> host_impl_;
54 }; 52 };
55 53
56 class DelegatedRendererLayerImplTestSimple 54 class DelegatedRendererLayerImplTestSimple
57 : public DelegatedRendererLayerImplTest { 55 : public DelegatedRendererLayerImplTest {
58 public: 56 public:
59 DelegatedRendererLayerImplTestSimple() 57 DelegatedRendererLayerImplTestSimple()
60 : DelegatedRendererLayerImplTest() { 58 : DelegatedRendererLayerImplTest() {
61 scoped_ptr<LayerImpl> root_layer = 59 scoped_ptr<LayerImpl> root_layer =
62 SolidColorLayerImpl::Create(host_impl_->active_tree(), 1); 60 SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 scoped_ptr<DelegatedRendererLayerImpl> other_layer = 1666 scoped_ptr<DelegatedRendererLayerImpl> other_layer =
1669 DelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 6); 1667 DelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 6);
1670 1668
1671 delegated_renderer_layer_impl->PushPropertiesTo(other_layer.get()); 1669 delegated_renderer_layer_impl->PushPropertiesTo(other_layer.get());
1672 1670
1673 EXPECT_EQ(0.5f, other_layer->inverse_device_scale_factor()); 1671 EXPECT_EQ(0.5f, other_layer->inverse_device_scale_factor());
1674 } 1672 }
1675 1673
1676 } // namespace 1674 } // namespace
1677 } // namespace cc 1675 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/heads_up_display_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698