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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 void RenderWidgetHostViewAndroid::ReturnResources( | 977 void RenderWidgetHostViewAndroid::ReturnResources( |
978 const cc::ReturnedResourceArray& resources) { | 978 const cc::ReturnedResourceArray& resources) { |
979 if (resources.empty()) | 979 if (resources.empty()) |
980 return; | 980 return; |
981 std::copy(resources.begin(), resources.end(), | 981 std::copy(resources.begin(), resources.end(), |
982 std::back_inserter(surface_returned_resources_)); | 982 std::back_inserter(surface_returned_resources_)); |
983 if (!ack_callbacks_.size()) | 983 if (!ack_callbacks_.size()) |
984 SendReturnedDelegatedResources(last_output_surface_id_); | 984 SendReturnedDelegatedResources(last_output_surface_id_); |
985 } | 985 } |
986 | 986 |
| 987 void RenderWidgetHostViewAndroid::SetBeginFrameSource( |
| 988 cc::SurfaceId surface_id, |
| 989 cc::BeginFrameSource* begin_frame_source) { |
| 990 // TODO(tansell): Hook this up. |
| 991 NOTIMPLEMENTED(); |
| 992 } |
| 993 |
987 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { | 994 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { |
988 RemoveLayers(); | 995 RemoveLayers(); |
989 frame_provider_ = NULL; | 996 frame_provider_ = NULL; |
990 if (!surface_id_.is_null()) { | 997 if (!surface_id_.is_null()) { |
991 DCHECK(surface_factory_.get()); | 998 DCHECK(surface_factory_.get()); |
992 surface_factory_->Destroy(surface_id_); | 999 surface_factory_->Destroy(surface_id_); |
993 surface_id_ = cc::SurfaceId(); | 1000 surface_id_ = cc::SurfaceId(); |
994 } | 1001 } |
995 layer_ = NULL; | 1002 layer_ = NULL; |
996 } | 1003 } |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2038 results->orientationAngle = display.RotationAsDegree(); | 2045 results->orientationAngle = display.RotationAsDegree(); |
2039 results->orientationType = | 2046 results->orientationType = |
2040 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2047 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2041 gfx::DeviceDisplayInfo info; | 2048 gfx::DeviceDisplayInfo info; |
2042 results->depth = info.GetBitsPerPixel(); | 2049 results->depth = info.GetBitsPerPixel(); |
2043 results->depthPerComponent = info.GetBitsPerComponent(); | 2050 results->depthPerComponent = info.GetBitsPerComponent(); |
2044 results->isMonochrome = (results->depthPerComponent == 0); | 2051 results->isMonochrome = (results->depthPerComponent == 0); |
2045 } | 2052 } |
2046 | 2053 |
2047 } // namespace content | 2054 } // namespace content |
OLD | NEW |