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

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

Issue 12965007: Fix cpplint errors in cc/(animation|input|layers|trees|test)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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
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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "cc/layers/delegated_renderer_layer.h" 7 #include "cc/layers/delegated_renderer_layer.h"
8 #include "cc/layers/delegated_renderer_layer_impl.h" 8 #include "cc/layers/delegated_renderer_layer_impl.h"
9 #include "cc/output/delegated_frame_data.h" 9 #include "cc/output/delegated_frame_data.h"
10 #include "cc/quads/shared_quad_state.h" 10 #include "cc/quads/shared_quad_state.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return; 107 return;
108 delegated_->SetFrameData(CreateFrameData(gfx::Rect(0, 0, 1, 1), 108 delegated_->SetFrameData(CreateFrameData(gfx::Rect(0, 0, 1, 1),
109 gfx::Rect(0, 0, 1, 1))); 109 gfx::Rect(0, 0, 1, 1)));
110 } 110 }
111 111
112 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { 112 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
113 LayerImpl* root_impl = host_impl->active_tree()->root_layer(); 113 LayerImpl* root_impl = host_impl->active_tree()->root_layer();
114 FakeDelegatedRendererLayerImpl* delegated_impl = 114 FakeDelegatedRendererLayerImpl* delegated_impl =
115 static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]); 115 static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]);
116 116
117 WebKit::WebGraphicsContext3D* context =
118 host_impl->resource_provider()->GraphicsContext3D();
119
117 ++num_activates_; 120 ++num_activates_;
118 switch(num_activates_) { 121 switch (num_activates_) {
119 case 2: 122 case 2:
120 EXPECT_TRUE(delegated_impl->ChildId()); 123 EXPECT_TRUE(delegated_impl->ChildId());
121 EXPECT_FALSE(did_reset_child_id_); 124 EXPECT_FALSE(did_reset_child_id_);
122 125
123 host_impl->resource_provider()->GraphicsContext3D()->loseContextCHROMIUM ( 126 context->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
124 GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB); 127 GL_INNOCENT_CONTEXT_RESET_ARB);
125 break; 128 break;
126 case 3: 129 case 3:
127 EXPECT_TRUE(delegated_impl->ChildId()); 130 EXPECT_TRUE(delegated_impl->ChildId());
128 EXPECT_TRUE(did_reset_child_id_); 131 EXPECT_TRUE(did_reset_child_id_);
129 EndTest(); 132 EndTest();
130 break; 133 break;
131 } 134 }
132 } 135 }
133 136
134 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, 137 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl,
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 } 1232 }
1230 } 1233 }
1231 1234
1232 virtual void AfterTest() OVERRIDE {} 1235 virtual void AfterTest() OVERRIDE {}
1233 }; 1236 };
1234 1237
1235 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCommitWithoutTake) 1238 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCommitWithoutTake)
1236 1239
1237 } // namespace 1240 } // namespace
1238 } // namespace cc 1241 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698