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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
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"
23 #include "cc/layers/surface_layer.h" 22 #include "cc/layers/surface_layer.h"
24 #include "cc/output/compositor_frame.h" 23 #include "cc/output/compositor_frame.h"
25 #include "cc/output/compositor_frame_ack.h" 24 #include "cc/output/compositor_frame_ack.h"
26 #include "cc/output/copy_output_request.h" 25 #include "cc/output/copy_output_request.h"
27 #include "cc/output/copy_output_result.h" 26 #include "cc/output/copy_output_result.h"
28 #include "cc/output/latency_info_swap_promise.h" 27 #include "cc/output/latency_info_swap_promise.h"
29 #include "cc/output/viewport_selection_bound.h" 28 #include "cc/output/viewport_selection_bound.h"
30 #include "cc/resources/single_release_callback.h" 29 #include "cc/resources/single_release_callback.h"
31 #include "cc/surfaces/surface.h" 30 #include "cc/surfaces/surface.h"
32 #include "cc/surfaces/surface_factory.h" 31 #include "cc/surfaces/surface_factory.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 438 }
440 439
441 scoped_refptr<cc::Layer> RenderWidgetHostViewAndroid::CreateDelegatedLayer() 440 scoped_refptr<cc::Layer> RenderWidgetHostViewAndroid::CreateDelegatedLayer()
442 const { 441 const {
443 scoped_refptr<cc::Layer> delegated_layer; 442 scoped_refptr<cc::Layer> delegated_layer;
444 DCHECK(!surface_id_.is_null()); 443 DCHECK(!surface_id_.is_null());
445 cc::SurfaceManager* manager = CompositorImpl::GetSurfaceManager(); 444 cc::SurfaceManager* manager = CompositorImpl::GetSurfaceManager();
446 DCHECK(manager); 445 DCHECK(manager);
447 // manager must outlive compositors using it. 446 // manager must outlive compositors using it.
448 scoped_refptr<cc::SurfaceLayer> surface_layer = cc::SurfaceLayer::Create( 447 scoped_refptr<cc::SurfaceLayer> surface_layer = cc::SurfaceLayer::Create(
449 cc::LayerSettings(), 448
ajuma 2016/03/11 00:40:54 No need for a blank line here.
loyso (OOO) 2016/03/11 03:26:57 Done.
450 base::Bind(&SatisfyCallback, base::Unretained(manager)), 449 base::Bind(&SatisfyCallback, base::Unretained(manager)),
451 base::Bind(&RequireCallback, base::Unretained(manager))); 450 base::Bind(&RequireCallback, base::Unretained(manager)));
452 surface_layer->SetSurfaceId(surface_id_, 1.f, texture_size_in_layer_); 451 surface_layer->SetSurfaceId(surface_id_, 1.f, texture_size_in_layer_);
453 delegated_layer = surface_layer; 452 delegated_layer = surface_layer;
454 delegated_layer->SetBounds(texture_size_in_layer_); 453 delegated_layer->SetBounds(texture_size_in_layer_);
455 delegated_layer->SetIsDrawable(true); 454 delegated_layer->SetIsDrawable(true);
456 delegated_layer->SetContentsOpaque(true); 455 delegated_layer->SetContentsOpaque(true);
457 456
458 return delegated_layer; 457 return delegated_layer;
459 } 458 }
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 results->orientationAngle = display.RotationAsDegree(); 2014 results->orientationAngle = display.RotationAsDegree();
2016 results->orientationType = 2015 results->orientationType =
2017 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2016 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2018 gfx::DeviceDisplayInfo info; 2017 gfx::DeviceDisplayInfo info;
2019 results->depth = info.GetBitsPerPixel(); 2018 results->depth = info.GetBitsPerPixel();
2020 results->depthPerComponent = info.GetBitsPerComponent(); 2019 results->depthPerComponent = info.GetBitsPerComponent();
2021 results->isMonochrome = (results->depthPerComponent == 0); 2020 results->isMonochrome = (results->depthPerComponent == 0);
2022 } 2021 }
2023 2022
2024 } // namespace content 2023 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698