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 "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 void RenderWidgetHostViewAndroid::ReturnResources( | 976 void RenderWidgetHostViewAndroid::ReturnResources( |
977 const cc::ReturnedResourceArray& resources) { | 977 const cc::ReturnedResourceArray& resources) { |
978 if (resources.empty()) | 978 if (resources.empty()) |
979 return; | 979 return; |
980 std::copy(resources.begin(), resources.end(), | 980 std::copy(resources.begin(), resources.end(), |
981 std::back_inserter(surface_returned_resources_)); | 981 std::back_inserter(surface_returned_resources_)); |
982 if (!ack_callbacks_.size()) | 982 if (!ack_callbacks_.size()) |
983 SendReturnedDelegatedResources(last_output_surface_id_); | 983 SendReturnedDelegatedResources(last_output_surface_id_); |
984 } | 984 } |
985 | 985 |
| 986 void RenderWidgetHostViewAndroid::SetBeginFrameSource( |
| 987 cc::BeginFrameSource* begin_frame_source) { |
| 988 // TODO(tansell): Hook this up. |
| 989 } |
| 990 |
986 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { | 991 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { |
987 RemoveLayers(); | 992 RemoveLayers(); |
988 frame_provider_ = NULL; | 993 frame_provider_ = NULL; |
989 if (!surface_id_.is_null()) { | 994 if (!surface_id_.is_null()) { |
990 DCHECK(surface_factory_.get()); | 995 DCHECK(surface_factory_.get()); |
991 surface_factory_->Destroy(surface_id_); | 996 surface_factory_->Destroy(surface_id_); |
992 surface_id_ = cc::SurfaceId(); | 997 surface_id_ = cc::SurfaceId(); |
993 } | 998 } |
994 layer_ = NULL; | 999 layer_ = NULL; |
995 } | 1000 } |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2011 results->orientationAngle = display.RotationAsDegree(); | 2016 results->orientationAngle = display.RotationAsDegree(); |
2012 results->orientationType = | 2017 results->orientationType = |
2013 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2018 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2014 gfx::DeviceDisplayInfo info; | 2019 gfx::DeviceDisplayInfo info; |
2015 results->depth = info.GetBitsPerPixel(); | 2020 results->depth = info.GetBitsPerPixel(); |
2016 results->depthPerComponent = info.GetBitsPerComponent(); | 2021 results->depthPerComponent = info.GetBitsPerComponent(); |
2017 results->isMonochrome = (results->depthPerComponent == 0); | 2022 results->isMonochrome = (results->depthPerComponent == 0); |
2018 } | 2023 } |
2019 | 2024 |
2020 } // namespace content | 2025 } // namespace content |
OLD | NEW |