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

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

Issue 1339803002: Clear page display after navigation if no rendered output arrives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made ClearCompositorFrame pure virtual Created 5 years, 3 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 (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 "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 // any potential compositor scheduling. 1142 // any potential compositor scheduling.
1143 OnFrameMetadataUpdated(metadata); 1143 OnFrameMetadataUpdated(metadata);
1144 } 1144 }
1145 1145
1146 void RenderWidgetHostViewAndroid::OnSwapCompositorFrame( 1146 void RenderWidgetHostViewAndroid::OnSwapCompositorFrame(
1147 uint32 output_surface_id, 1147 uint32 output_surface_id,
1148 scoped_ptr<cc::CompositorFrame> frame) { 1148 scoped_ptr<cc::CompositorFrame> frame) {
1149 InternalSwapCompositorFrame(output_surface_id, frame.Pass()); 1149 InternalSwapCompositorFrame(output_surface_id, frame.Pass());
1150 } 1150 }
1151 1151
1152 void RenderWidgetHostViewAndroid::ClearCompositorFrame() {
1153 DestroyDelegatedContent();
1154 }
1155
1152 void RenderWidgetHostViewAndroid::RetainFrame( 1156 void RenderWidgetHostViewAndroid::RetainFrame(
1153 uint32 output_surface_id, 1157 uint32 output_surface_id,
1154 scoped_ptr<cc::CompositorFrame> frame) { 1158 scoped_ptr<cc::CompositorFrame> frame) {
1155 DCHECK(locks_on_frame_count_); 1159 DCHECK(locks_on_frame_count_);
1156 1160
1157 // Store the incoming frame so that it can be swapped when all the locks have 1161 // Store the incoming frame so that it can be swapped when all the locks have
1158 // been released. If there is already a stored frame, then replace and skip 1162 // been released. If there is already a stored frame, then replace and skip
1159 // the previous one but make sure we still eventually send the ACK. Holding 1163 // the previous one but make sure we still eventually send the ACK. Holding
1160 // the ACK also blocks the renderer when its max_frames_pending is reached. 1164 // the ACK also blocks the renderer when its max_frames_pending is reached.
1161 if (last_frame_info_) { 1165 if (last_frame_info_) {
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 results->orientationAngle = display.RotationAsDegree(); 2017 results->orientationAngle = display.RotationAsDegree();
2014 results->orientationType = 2018 results->orientationType =
2015 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2019 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2016 gfx::DeviceDisplayInfo info; 2020 gfx::DeviceDisplayInfo info;
2017 results->depth = info.GetBitsPerPixel(); 2021 results->depth = info.GetBitsPerPixel();
2018 results->depthPerComponent = info.GetBitsPerComponent(); 2022 results->depthPerComponent = info.GetBitsPerComponent();
2019 results->isMonochrome = (results->depthPerComponent == 0); 2023 results->isMonochrome = (results->depthPerComponent == 0);
2020 } 2024 }
2021 2025
2022 } // namespace content 2026 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698