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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 void RenderWidgetHostViewAndroid::DidCreateNewRendererCompositorFrameSink() { 1130 void RenderWidgetHostViewAndroid::DidCreateNewRendererCompositorFrameSink() {
1131 delegated_frame_host_->CompositorFrameSinkChanged(); 1131 delegated_frame_host_->CompositorFrameSinkChanged();
1132 // Accumulated resources belong to the old RendererCompositorFrameSink and 1132 // Accumulated resources belong to the old RendererCompositorFrameSink and
1133 // should not be returned. 1133 // should not be returned.
1134 surface_returned_resources_.clear(); 1134 surface_returned_resources_.clear();
1135 } 1135 }
1136 1136
1137 void RenderWidgetHostViewAndroid::SubmitCompositorFrame( 1137 void RenderWidgetHostViewAndroid::SubmitCompositorFrame(
1138 const cc::LocalSurfaceId& local_surface_id, 1138 const cc::LocalSurfaceId& local_surface_id,
1139 cc::CompositorFrame frame) { 1139 cc::CompositorFrame frame) {
1140 // In fullscreen, prevent background from flashing white.
Khushal 2017/04/12 01:56:55 Like we were discussing this will still miss a few
1141 if (content_view_core_ &&
1142 content_view_core_->GetWebContents()->IsFullscreen()) {
1143 frame.metadata.root_background_color = SK_ColorBLACK;
1144 }
1145
1140 last_scroll_offset_ = frame.metadata.root_scroll_offset; 1146 last_scroll_offset_ = frame.metadata.root_scroll_offset;
1141 DCHECK(delegated_frame_host_); 1147 DCHECK(delegated_frame_host_);
1142 DCHECK(!frame.render_pass_list.empty()); 1148 DCHECK(!frame.render_pass_list.empty());
1143 1149
1144 cc::RenderPass* root_pass = frame.render_pass_list.back().get(); 1150 cc::RenderPass* root_pass = frame.render_pass_list.back().get();
1145 current_surface_size_ = root_pass->output_rect.size(); 1151 current_surface_size_ = root_pass->output_rect.size();
1146 bool is_transparent = root_pass->has_transparent_background; 1152 bool is_transparent = root_pass->has_transparent_background;
1147 1153
1148 cc::CompositorFrameMetadata metadata = frame.metadata.Clone(); 1154 cc::CompositorFrameMetadata metadata = frame.metadata.Clone();
1149 1155
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 2179
2174 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 2180 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
2175 if (!compositor) 2181 if (!compositor)
2176 return; 2182 return;
2177 2183
2178 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2184 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2179 overscroll_refresh_handler, compositor, view_.GetDipScale()); 2185 overscroll_refresh_handler, compositor, view_.GetDipScale());
2180 } 2186 }
2181 2187
2182 } // namespace content 2188 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698