| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(frame.get())); | 185 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(frame.get())); |
| 186 last_on_draw_render_passes_.clear(); | 186 last_on_draw_render_passes_.clear(); |
| 187 RenderPass::CopyAll(frame->render_passes, &last_on_draw_render_passes_); | 187 RenderPass::CopyAll(frame->render_passes, &last_on_draw_render_passes_); |
| 188 host_impl_->DrawLayers(frame.get()); | 188 host_impl_->DrawLayers(frame.get()); |
| 189 host_impl_->DidDrawAllLayers(*frame); | 189 host_impl_->DidDrawAllLayers(*frame); |
| 190 last_on_draw_frame_ = std::move(frame); | 190 last_on_draw_frame_ = std::move(frame); |
| 191 } | 191 } |
| 192 void NeedsImplSideInvalidation() override { | 192 void NeedsImplSideInvalidation() override { |
| 193 did_request_impl_side_invalidation_ = true; | 193 did_request_impl_side_invalidation_ = true; |
| 194 } | 194 } |
| 195 void NotifyImageDecodeRequestFinished() override {} |
| 195 | 196 |
| 196 void set_reduce_memory_result(bool reduce_memory_result) { | 197 void set_reduce_memory_result(bool reduce_memory_result) { |
| 197 reduce_memory_result_ = reduce_memory_result; | 198 reduce_memory_result_ = reduce_memory_result; |
| 198 } | 199 } |
| 199 | 200 |
| 200 virtual bool CreateHostImpl( | 201 virtual bool CreateHostImpl( |
| 201 const LayerTreeSettings& settings, | 202 const LayerTreeSettings& settings, |
| 202 std::unique_ptr<CompositorFrameSink> compositor_frame_sink) { | 203 std::unique_ptr<CompositorFrameSink> compositor_frame_sink) { |
| 203 return CreateHostImplWithTaskRunnerProvider( | 204 return CreateHostImplWithTaskRunnerProvider( |
| 204 settings, std::move(compositor_frame_sink), &task_runner_provider_); | 205 settings, std::move(compositor_frame_sink), &task_runner_provider_); |
| (...skipping 12335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12540 // layer should be prioritized over the hidden layer. | 12541 // layer should be prioritized over the hidden layer. |
| 12541 hidden_layer->set_contributes_to_drawn_render_surface(false); | 12542 hidden_layer->set_contributes_to_drawn_render_surface(false); |
| 12542 hidden_layer->set_raster_even_if_not_drawn(true); | 12543 hidden_layer->set_raster_even_if_not_drawn(true); |
| 12543 queue = host_impl_->BuildRasterQueue(TreePriority::SMOOTHNESS_TAKES_PRIORITY, | 12544 queue = host_impl_->BuildRasterQueue(TreePriority::SMOOTHNESS_TAKES_PRIORITY, |
| 12544 RasterTilePriorityQueue::Type::ALL); | 12545 RasterTilePriorityQueue::Type::ALL); |
| 12545 EXPECT_EQ(queue->Top().tile()->layer_id(), 3); | 12546 EXPECT_EQ(queue->Top().tile()->layer_id(), 3); |
| 12546 } | 12547 } |
| 12547 | 12548 |
| 12548 } // namespace | 12549 } // namespace |
| 12549 } // namespace cc | 12550 } // namespace cc |
| OLD | NEW |