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

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

Issue 2752833002: cc: Use gpu raster in HUD. (Closed)
Patch Set: fix failing test. Created 3 years, 7 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/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 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); 1688 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame));
1689 } 1689 }
1690 1690
1691 const DrawMode draw_mode = GetDrawMode(); 1691 const DrawMode draw_mode = GetDrawMode();
1692 1692
1693 // Because the contents of the HUD depend on everything else in the frame, the 1693 // Because the contents of the HUD depend on everything else in the frame, the
1694 // contents of its texture are updated as the last thing before the frame is 1694 // contents of its texture are updated as the last thing before the frame is
1695 // drawn. 1695 // drawn.
1696 if (active_tree_->hud_layer()) { 1696 if (active_tree_->hud_layer()) {
1697 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture"); 1697 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture");
1698 active_tree_->hud_layer()->UpdateHudTexture(draw_mode, 1698 active_tree_->hud_layer()->UpdateHudTexture(
1699 resource_provider_.get()); 1699 draw_mode, resource_provider_.get(),
1700 compositor_frame_sink_->context_provider());
1700 } 1701 }
1701 1702
1702 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata(); 1703 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata();
1703 metadata.may_contain_video = frame->may_contain_video; 1704 metadata.may_contain_video = frame->may_contain_video;
1704 metadata.activation_dependencies = std::move(frame->activation_dependencies); 1705 metadata.activation_dependencies = std::move(frame->activation_dependencies);
1705 active_tree()->FinishSwapPromises(&metadata); 1706 active_tree()->FinishSwapPromises(&metadata);
1706 for (auto& latency : metadata.latency_info) { 1707 for (auto& latency : metadata.latency_info) {
1707 TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow", 1708 TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow",
1708 TRACE_ID_DONT_MANGLE(latency.trace_id()), 1709 TRACE_ID_DONT_MANGLE(latency.trace_id()),
1709 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, 1710 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT,
(...skipping 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after
4302 4303
4303 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { 4304 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) {
4304 if (!element_id) 4305 if (!element_id)
4305 return; 4306 return;
4306 if (ScrollbarAnimationController* animation_controller = 4307 if (ScrollbarAnimationController* animation_controller =
4307 ScrollbarAnimationControllerForElementId(element_id)) 4308 ScrollbarAnimationControllerForElementId(element_id))
4308 animation_controller->DidScrollUpdate(); 4309 animation_controller->DidScrollUpdate();
4309 } 4310 }
4310 4311
4311 } // namespace cc 4312 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698