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

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

Issue 2752833002: cc: Use gpu raster in HUD. (Closed)
Patch Set: review comments updated. Created 3 years, 6 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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); 1700 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame));
1701 } 1701 }
1702 1702
1703 const DrawMode draw_mode = GetDrawMode(); 1703 const DrawMode draw_mode = GetDrawMode();
1704 1704
1705 // Because the contents of the HUD depend on everything else in the frame, the 1705 // Because the contents of the HUD depend on everything else in the frame, the
1706 // contents of its texture are updated as the last thing before the frame is 1706 // contents of its texture are updated as the last thing before the frame is
1707 // drawn. 1707 // drawn.
1708 if (active_tree_->hud_layer()) { 1708 if (active_tree_->hud_layer()) {
1709 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture"); 1709 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture");
1710 active_tree_->hud_layer()->UpdateHudTexture(draw_mode, 1710 active_tree_->hud_layer()->UpdateHudTexture(
1711 resource_provider_.get()); 1711 draw_mode, resource_provider_.get(),
1712 compositor_frame_sink_->context_provider());
1712 } 1713 }
1713 1714
1714 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata(); 1715 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata();
1715 metadata.may_contain_video = frame->may_contain_video; 1716 metadata.may_contain_video = frame->may_contain_video;
1716 metadata.activation_dependencies = std::move(frame->activation_dependencies); 1717 metadata.activation_dependencies = std::move(frame->activation_dependencies);
1717 active_tree()->FinishSwapPromises(&metadata); 1718 active_tree()->FinishSwapPromises(&metadata);
1718 for (auto& latency : metadata.latency_info) { 1719 for (auto& latency : metadata.latency_info) {
1719 TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow", 1720 TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow",
1720 TRACE_ID_DONT_MANGLE(latency.trace_id()), 1721 TRACE_ID_DONT_MANGLE(latency.trace_id()),
1721 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, 1722 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT,
(...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after
4299 4300
4300 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { 4301 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) {
4301 if (!element_id) 4302 if (!element_id)
4302 return; 4303 return;
4303 if (ScrollbarAnimationController* animation_controller = 4304 if (ScrollbarAnimationController* animation_controller =
4304 ScrollbarAnimationControllerForElementId(element_id)) 4305 ScrollbarAnimationControllerForElementId(element_id))
4305 animation_controller->DidScrollUpdate(); 4306 animation_controller->DidScrollUpdate();
4306 } 4307 }
4307 4308
4308 } // namespace cc 4309 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698