Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 442 using_browser_compositor_(CompositorImpl::IsInitialized()), | 442 using_browser_compositor_(CompositorImpl::IsInitialized()), |
| 443 synchronous_compositor_client_(nullptr), | 443 synchronous_compositor_client_(nullptr), |
| 444 frame_evictor_(new DelegatedFrameEvictor(this)), | 444 frame_evictor_(new DelegatedFrameEvictor(this)), |
| 445 locks_on_frame_count_(0), | 445 locks_on_frame_count_(0), |
| 446 observing_root_window_(false), | 446 observing_root_window_(false), |
| 447 weak_ptr_factory_(this) { | 447 weak_ptr_factory_(this) { |
| 448 // Set the layer which will hold the content layer for this view. The content | 448 // Set the layer which will hold the content layer for this view. The content |
| 449 // layer is managed by the DelegatedFrameHost. | 449 // layer is managed by the DelegatedFrameHost. |
| 450 view_.SetLayer(cc::Layer::Create()); | 450 view_.SetLayer(cc::Layer::Create()); |
| 451 if (using_browser_compositor_) { | 451 if (using_browser_compositor_) { |
| 452 cc::FrameSinkId frame_sink_id = cc::FrameSinkId( | |
| 453 base::checked_cast<uint32_t>(host_->GetProcess()->GetID()), | |
|
boliu
2017/01/26 00:14:39
these numbers are ok as the "client id" and "sink
xlai (Olivia)
2017/01/26 15:56:11
Yes, clientId+SinkId is the frame sink id. Again t
Fady Samuel
2017/01/26 16:06:36
The FrameSinkId uniquely identifies a CompositorFr
boliu
2017/01/26 19:24:45
I was mostly asking for correctness.
So for rende
Fady Samuel
2017/01/26 20:15:22
Good catch on Android, we don't AllocateFrameSinkI
xlai (Olivia)
2017/01/26 20:50:21
I just made a fix to ContextProviderFactory in And
| |
| 454 base::checked_cast<uint32_t>(host_->GetRoutingID())); | |
| 452 delegated_frame_host_.reset(new ui::DelegatedFrameHostAndroid( | 455 delegated_frame_host_.reset(new ui::DelegatedFrameHostAndroid( |
| 453 &view_, cached_background_color_, this)); | 456 &view_, cached_background_color_, this, frame_sink_id)); |
| 454 } | 457 } |
| 455 | 458 |
| 456 host_->SetView(this); | 459 host_->SetView(this); |
| 457 SetContentViewCore(content_view_core); | 460 SetContentViewCore(content_view_core); |
| 458 | 461 |
| 459 CreateOverscrollControllerIfPossible(); | 462 CreateOverscrollControllerIfPossible(); |
| 460 | 463 |
| 461 if (GetTextInputManager()) | 464 if (GetTextInputManager()) |
| 462 GetTextInputManager()->AddObserver(this); | 465 GetTextInputManager()->AddObserver(this); |
| 463 } | 466 } |
| (...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2067 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2070 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2068 if (!compositor) | 2071 if (!compositor) |
| 2069 return; | 2072 return; |
| 2070 | 2073 |
| 2071 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2074 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2072 overscroll_refresh_handler, compositor, | 2075 overscroll_refresh_handler, compositor, |
| 2073 ui::GetScaleFactorForNativeView(GetNativeView())); | 2076 ui::GetScaleFactorForNativeView(GetNativeView())); |
| 2074 } | 2077 } |
| 2075 | 2078 |
| 2076 } // namespace content | 2079 } // namespace content |
| OLD | NEW |