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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 924973003: CC: Force push properties for all layers when tracing is started (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 5 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 21 matching lines...) Expand all
32 #include "testing/gmock/include/gmock/gmock.h" 32 #include "testing/gmock/include/gmock/gmock.h"
33 #include "ui/gfx/frame_time.h" 33 #include "ui/gfx/frame_time.h"
34 #include "ui/gfx/geometry/size_conversions.h" 34 #include "ui/gfx/geometry/size_conversions.h"
35 35
36 namespace cc { 36 namespace cc {
37 37
38 TestHooks::TestHooks() {} 38 TestHooks::TestHooks() {}
39 39
40 TestHooks::~TestHooks() {} 40 TestHooks::~TestHooks() {}
41 41
42 DrawResult TestHooks::PrepareToDrawOnThread( 42 DrawResult TestHooks::PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
43 LayerTreeHostImpl* host_impl, 43 FrameData* frame_data,
44 LayerTreeHostImpl::FrameData* frame_data, 44 DrawResult draw_result) {
45 DrawResult draw_result) {
46 return draw_result; 45 return draw_result;
47 } 46 }
48 47
49 scoped_ptr<Rasterizer> TestHooks::CreateRasterizer( 48 scoped_ptr<Rasterizer> TestHooks::CreateRasterizer(
50 LayerTreeHostImpl* host_impl) { 49 LayerTreeHostImpl* host_impl) {
51 return host_impl->LayerTreeHostImpl::CreateRasterizer(); 50 return host_impl->LayerTreeHostImpl::CreateRasterizer();
52 } 51 }
53 52
54 void TestHooks::CreateResourceAndTileTaskWorkerPool( 53 void TestHooks::CreateResourceAndTileTaskWorkerPool(
55 LayerTreeHostImpl* host_impl, 54 LayerTreeHostImpl* host_impl,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 DrawResult PrepareToDraw(FrameData* frame) override { 274 DrawResult PrepareToDraw(FrameData* frame) override {
276 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame); 275 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame);
277 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result); 276 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result);
278 } 277 }
279 278
280 void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time) override { 279 void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time) override {
281 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time); 280 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time);
282 test_hooks_->DrawLayersOnThread(this); 281 test_hooks_->DrawLayersOnThread(this);
283 } 282 }
284 283
285 bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) override { 284 bool SwapBuffers(const FrameData& frame) override {
286 bool result = LayerTreeHostImpl::SwapBuffers(frame); 285 bool result = LayerTreeHostImpl::SwapBuffers(frame);
287 test_hooks_->SwapBuffersOnThread(this, result); 286 test_hooks_->SwapBuffersOnThread(this, result);
288 return result; 287 return result;
289 } 288 }
290 289
291 void DidSwapBuffersComplete() override { 290 void DidSwapBuffersComplete() override {
292 LayerTreeHostImpl::DidSwapBuffersComplete(); 291 LayerTreeHostImpl::DidSwapBuffersComplete();
293 test_hooks_->SwapBuffersCompleteOnThread(this); 292 test_hooks_->SwapBuffersCompleteOnThread(this);
294 } 293 }
295 294
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 return -1; 871 return -1;
873 } 872 }
874 873
875 void LayerTreeTest::DestroyLayerTreeHost() { 874 void LayerTreeTest::DestroyLayerTreeHost() {
876 if (layer_tree_host_ && layer_tree_host_->root_layer()) 875 if (layer_tree_host_ && layer_tree_host_->root_layer())
877 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 876 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
878 layer_tree_host_ = nullptr; 877 layer_tree_host_ = nullptr;
879 } 878 }
880 879
881 } // namespace cc 880 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698