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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2763223003: Reland of cc: Don't use StreamVideoDrawQuad on any platform but Android. (Closed)
Patch Set: Fix tests. 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
« no previous file with comments | « cc/trees/layer_tree_settings.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 // emulator. Aura Overlay Scrollbar will override below. 441 // emulator. Aura Overlay Scrollbar will override below.
442 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; 442 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY;
443 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); 443 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
444 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(300); 444 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(300);
445 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(300); 445 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(300);
446 446
447 #if defined(OS_ANDROID) 447 #if defined(OS_ANDROID)
448 bool using_synchronous_compositor = 448 bool using_synchronous_compositor =
449 GetContentClient()->UsingSynchronousCompositing(); 449 GetContentClient()->UsingSynchronousCompositing();
450 450
451 settings.use_stream_video_draw_quad = true;
451 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; 452 settings.using_synchronous_renderer_compositor = using_synchronous_compositor;
452 if (using_synchronous_compositor) { 453 if (using_synchronous_compositor) {
453 // Android WebView uses system scrollbars, so make ours invisible. 454 // Android WebView uses system scrollbars, so make ours invisible.
454 // http://crbug.com/677348: This can't be done using hide_scrollbars 455 // http://crbug.com/677348: This can't be done using hide_scrollbars
455 // setting because supporting -webkit custom scrollbars is still desired 456 // setting because supporting -webkit custom scrollbars is still desired
456 // on sublayers. 457 // on sublayers.
457 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; 458 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR;
458 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; 459 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT;
459 } 460 }
460 // Android WebView handles root layer flings itself. 461 // Android WebView handles root layer flings itself.
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) { 1253 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) {
1253 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>( 1254 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>(
1254 std::move(callback), base::ThreadTaskRunnerHandle::Get())); 1255 std::move(callback), base::ThreadTaskRunnerHandle::Get()));
1255 } 1256 }
1256 1257
1257 void RenderWidgetCompositor::RequestBeginMainFrameNotExpected(bool new_state) { 1258 void RenderWidgetCompositor::RequestBeginMainFrameNotExpected(bool new_state) {
1258 layer_tree_host_->RequestBeginMainFrameNotExpected(new_state); 1259 layer_tree_host_->RequestBeginMainFrameNotExpected(new_state);
1259 } 1260 }
1260 1261
1261 } // namespace content 1262 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698