OLD | NEW |
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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 new LayerTreeHostImpl::FrameData); | 168 new LayerTreeHostImpl::FrameData); |
169 EXPECT_EQ(DRAW_SUCCESS, PrepareToDrawFrame(frame.get())); | 169 EXPECT_EQ(DRAW_SUCCESS, PrepareToDrawFrame(frame.get())); |
170 last_on_draw_render_passes_.clear(); | 170 last_on_draw_render_passes_.clear(); |
171 RenderPass::CopyAll(frame->render_passes, &last_on_draw_render_passes_); | 171 RenderPass::CopyAll(frame->render_passes, &last_on_draw_render_passes_); |
172 if (!skip_draw_layers_in_on_draw_) | 172 if (!skip_draw_layers_in_on_draw_) |
173 host_impl_->DrawLayers(frame.get()); | 173 host_impl_->DrawLayers(frame.get()); |
174 host_impl_->DidDrawAllLayers(*frame); | 174 host_impl_->DidDrawAllLayers(*frame); |
175 host_impl_->SwapBuffers(*frame); | 175 host_impl_->SwapBuffers(*frame); |
176 last_on_draw_frame_ = std::move(frame); | 176 last_on_draw_frame_ = std::move(frame); |
177 } | 177 } |
178 void PostFrameTimingEventsOnImplThread( | |
179 std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | |
180 std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) | |
181 override {} | |
182 | 178 |
183 void set_reduce_memory_result(bool reduce_memory_result) { | 179 void set_reduce_memory_result(bool reduce_memory_result) { |
184 reduce_memory_result_ = reduce_memory_result; | 180 reduce_memory_result_ = reduce_memory_result; |
185 } | 181 } |
186 | 182 |
187 virtual bool CreateHostImpl(const LayerTreeSettings& settings, | 183 virtual bool CreateHostImpl(const LayerTreeSettings& settings, |
188 std::unique_ptr<OutputSurface> output_surface) { | 184 std::unique_ptr<OutputSurface> output_surface) { |
189 return CreateHostImplWithTaskRunnerProvider( | 185 return CreateHostImplWithTaskRunnerProvider( |
190 settings, std::move(output_surface), &task_runner_provider_); | 186 settings, std::move(output_surface), &task_runner_provider_); |
191 } | 187 } |
(...skipping 10481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10673 // There should not be any jitter measured till we hit the fixed point hits | 10669 // There should not be any jitter measured till we hit the fixed point hits |
10674 // threshold. | 10670 // threshold. |
10675 float expected_jitter = | 10671 float expected_jitter = |
10676 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; | 10672 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; |
10677 EXPECT_EQ(jitter, expected_jitter); | 10673 EXPECT_EQ(jitter, expected_jitter); |
10678 } | 10674 } |
10679 } | 10675 } |
10680 | 10676 |
10681 } // namespace | 10677 } // namespace |
10682 } // namespace cc | 10678 } // namespace cc |
OLD | NEW |