| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 const cc::ReturnedResourceArray& resources) { | 964 const cc::ReturnedResourceArray& resources) { |
| 965 if (resources.empty()) | 965 if (resources.empty()) |
| 966 return; | 966 return; |
| 967 std::copy(resources.begin(), resources.end(), | 967 std::copy(resources.begin(), resources.end(), |
| 968 std::back_inserter(surface_returned_resources_)); | 968 std::back_inserter(surface_returned_resources_)); |
| 969 if (!ack_callbacks_.size()) | 969 if (!ack_callbacks_.size()) |
| 970 SendReturnedDelegatedResources(last_output_surface_id_); | 970 SendReturnedDelegatedResources(last_output_surface_id_); |
| 971 } | 971 } |
| 972 | 972 |
| 973 void RenderWidgetHostViewAndroid::SetBeginFrameSource( | 973 void RenderWidgetHostViewAndroid::SetBeginFrameSource( |
| 974 cc::SurfaceId surface_id, | |
| 975 cc::BeginFrameSource* begin_frame_source) { | 974 cc::BeginFrameSource* begin_frame_source) { |
| 976 // TODO(tansell): Hook this up. | 975 // TODO(tansell): Hook this up. |
| 977 } | 976 } |
| 978 | 977 |
| 979 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { | 978 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { |
| 980 RemoveLayers(); | 979 RemoveLayers(); |
| 981 if (!surface_id_.is_null()) { | 980 if (!surface_id_.is_null()) { |
| 982 DCHECK(surface_factory_.get()); | 981 DCHECK(surface_factory_.get()); |
| 983 surface_factory_->Destroy(surface_id_); | 982 surface_factory_->Destroy(surface_id_); |
| 984 surface_id_ = cc::SurfaceId(); | 983 surface_id_ = cc::SurfaceId(); |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2019 results->orientationAngle = display.RotationAsDegree(); | 2018 results->orientationAngle = display.RotationAsDegree(); |
| 2020 results->orientationType = | 2019 results->orientationType = |
| 2021 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2020 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2022 gfx::DeviceDisplayInfo info; | 2021 gfx::DeviceDisplayInfo info; |
| 2023 results->depth = info.GetBitsPerPixel(); | 2022 results->depth = info.GetBitsPerPixel(); |
| 2024 results->depthPerComponent = info.GetBitsPerComponent(); | 2023 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2025 results->isMonochrome = (results->depthPerComponent == 0); | 2024 results->isMonochrome = (results->depthPerComponent == 0); |
| 2026 } | 2025 } |
| 2027 | 2026 |
| 2028 } // namespace content | 2027 } // namespace content |
| OLD | NEW |