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

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

Issue 1747783002: CC Animation: Erase old animation system in Android Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback_helpers.h" 12 #include "base/callback_helpers.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/sys_info.h" 19 #include "base/sys_info.h"
20 #include "base/threading/worker_pool.h" 20 #include "base/threading/worker_pool.h"
21 #include "cc/layers/layer.h" 21 #include "cc/layers/layer.h"
22 #include "cc/layers/layer_settings.h"
22 #include "cc/layers/surface_layer.h" 23 #include "cc/layers/surface_layer.h"
23 #include "cc/output/compositor_frame.h" 24 #include "cc/output/compositor_frame.h"
24 #include "cc/output/compositor_frame_ack.h" 25 #include "cc/output/compositor_frame_ack.h"
25 #include "cc/output/copy_output_request.h" 26 #include "cc/output/copy_output_request.h"
26 #include "cc/output/copy_output_result.h" 27 #include "cc/output/copy_output_result.h"
27 #include "cc/output/latency_info_swap_promise.h" 28 #include "cc/output/latency_info_swap_promise.h"
28 #include "cc/output/viewport_selection_bound.h" 29 #include "cc/output/viewport_selection_bound.h"
29 #include "cc/resources/single_release_callback.h" 30 #include "cc/resources/single_release_callback.h"
30 #include "cc/surfaces/surface.h" 31 #include "cc/surfaces/surface.h"
31 #include "cc/surfaces/surface_factory.h" 32 #include "cc/surfaces/surface_factory.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 439 }
439 440
440 scoped_refptr<cc::Layer> RenderWidgetHostViewAndroid::CreateDelegatedLayer() 441 scoped_refptr<cc::Layer> RenderWidgetHostViewAndroid::CreateDelegatedLayer()
441 const { 442 const {
442 scoped_refptr<cc::Layer> delegated_layer; 443 scoped_refptr<cc::Layer> delegated_layer;
443 DCHECK(!surface_id_.is_null()); 444 DCHECK(!surface_id_.is_null());
444 cc::SurfaceManager* manager = CompositorImpl::GetSurfaceManager(); 445 cc::SurfaceManager* manager = CompositorImpl::GetSurfaceManager();
445 DCHECK(manager); 446 DCHECK(manager);
446 // manager must outlive compositors using it. 447 // manager must outlive compositors using it.
447 scoped_refptr<cc::SurfaceLayer> surface_layer = cc::SurfaceLayer::Create( 448 scoped_refptr<cc::SurfaceLayer> surface_layer = cc::SurfaceLayer::Create(
448 Compositor::LayerSettings(), 449 cc::LayerSettings(),
449 base::Bind(&SatisfyCallback, base::Unretained(manager)), 450 base::Bind(&SatisfyCallback, base::Unretained(manager)),
450 base::Bind(&RequireCallback, base::Unretained(manager))); 451 base::Bind(&RequireCallback, base::Unretained(manager)));
451 surface_layer->SetSurfaceId(surface_id_, 1.f, texture_size_in_layer_); 452 surface_layer->SetSurfaceId(surface_id_, 1.f, texture_size_in_layer_);
452 delegated_layer = surface_layer; 453 delegated_layer = surface_layer;
453 delegated_layer->SetBounds(texture_size_in_layer_); 454 delegated_layer->SetBounds(texture_size_in_layer_);
454 delegated_layer->SetIsDrawable(true); 455 delegated_layer->SetIsDrawable(true);
455 delegated_layer->SetContentsOpaque(true); 456 delegated_layer->SetContentsOpaque(true);
456 457
457 return delegated_layer; 458 return delegated_layer;
458 } 459 }
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 results->orientationAngle = display.RotationAsDegree(); 2015 results->orientationAngle = display.RotationAsDegree();
2015 results->orientationType = 2016 results->orientationType =
2016 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2017 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2017 gfx::DeviceDisplayInfo info; 2018 gfx::DeviceDisplayInfo info;
2018 results->depth = info.GetBitsPerPixel(); 2019 results->depth = info.GetBitsPerPixel();
2019 results->depthPerComponent = info.GetBitsPerComponent(); 2020 results->depthPerComponent = info.GetBitsPerComponent();
2020 results->isMonochrome = (results->depthPerComponent == 0); 2021 results->isMonochrome = (results->depthPerComponent == 0);
2021 } 2022 }
2022 2023
2023 } // namespace content 2024 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/public/browser/android/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698