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

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

Issue 2723363002: gpu: Replace GpuMsg_Finalize ipc with equivalent mojom api (Closed)
Patch Set: . Created 3 years, 9 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 | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | content/common/gpu_host_messages.h » ('j') | 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 base::Passed(&release_callback), base::Passed(&bitmap), 401 base::Passed(&release_callback), base::Passed(&bitmap),
402 start_time, base::Passed(&bitmap_pixels_lock), readback_lock), 402 start_time, base::Passed(&bitmap_pixels_lock), readback_lock),
403 display_compositor::GLHelper::SCALER_QUALITY_GOOD); 403 display_compositor::GLHelper::SCALER_QUALITY_GOOD);
404 } 404 }
405 405
406 bool FloatEquals(float a, float b) { 406 bool FloatEquals(float a, float b) {
407 return std::abs(a - b) < FLT_EPSILON; 407 return std::abs(a - b) < FLT_EPSILON;
408 } 408 }
409 409
410 void WakeUpGpu(GpuProcessHost* host) { 410 void WakeUpGpu(GpuProcessHost* host) {
411 DCHECK(host); 411 if (!host)
412 return;
412 GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance(); 413 GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance();
413 if (gpu_data && 414 if (gpu_data &&
414 gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING)) 415 gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING))
415 host->gpu_service()->WakeUpGpu(); 416 host->gpu_service()->WakeUpGpu();
416 } 417 }
417 418
418 } // namespace 419 } // namespace
419 420
420 void RenderWidgetHostViewAndroid::OnContextLost() { 421 void RenderWidgetHostViewAndroid::OnContextLost() {
421 std::unique_ptr<RenderWidgetHostIterator> widgets( 422 std::unique_ptr<RenderWidgetHostIterator> widgets(
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 2109 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
2109 if (!compositor) 2110 if (!compositor)
2110 return; 2111 return;
2111 2112
2112 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2113 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2113 overscroll_refresh_handler, compositor, 2114 overscroll_refresh_handler, compositor,
2114 ui::GetScaleFactorForNativeView(GetNativeView())); 2115 ui::GetScaleFactorForNativeView(GetNativeView()));
2115 } 2116 }
2116 2117
2117 } // namespace content 2118 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | content/common/gpu_host_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698