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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 const cc::ReturnedResourceArray& resources) { | 968 const cc::ReturnedResourceArray& resources) { |
969 if (resources.empty()) | 969 if (resources.empty()) |
970 return; | 970 return; |
971 std::copy(resources.begin(), resources.end(), | 971 std::copy(resources.begin(), resources.end(), |
972 std::back_inserter(surface_returned_resources_)); | 972 std::back_inserter(surface_returned_resources_)); |
973 if (!ack_callbacks_.size()) | 973 if (!ack_callbacks_.size()) |
974 SendReturnedDelegatedResources(last_output_surface_id_); | 974 SendReturnedDelegatedResources(last_output_surface_id_); |
975 } | 975 } |
976 | 976 |
977 void RenderWidgetHostViewAndroid::SetBeginFrameSource( | 977 void RenderWidgetHostViewAndroid::SetBeginFrameSource( |
978 cc::SurfaceId surface_id, | |
979 cc::BeginFrameSource* begin_frame_source) { | 978 cc::BeginFrameSource* begin_frame_source) { |
980 // TODO(tansell): Hook this up. | 979 // TODO(tansell): Hook this up. |
981 } | 980 } |
982 | 981 |
983 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { | 982 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { |
984 RemoveLayers(); | 983 RemoveLayers(); |
985 if (!surface_id_.is_null()) { | 984 if (!surface_id_.is_null()) { |
986 DCHECK(surface_factory_.get()); | 985 DCHECK(surface_factory_.get()); |
987 surface_factory_->Destroy(surface_id_); | 986 surface_factory_->Destroy(surface_id_); |
988 surface_id_ = cc::SurfaceId(); | 987 surface_id_ = cc::SurfaceId(); |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 results->orientationAngle = display.RotationAsDegree(); | 2043 results->orientationAngle = display.RotationAsDegree(); |
2045 results->orientationType = | 2044 results->orientationType = |
2046 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2045 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2047 gfx::DeviceDisplayInfo info; | 2046 gfx::DeviceDisplayInfo info; |
2048 results->depth = info.GetBitsPerPixel(); | 2047 results->depth = info.GetBitsPerPixel(); |
2049 results->depthPerComponent = info.GetBitsPerComponent(); | 2048 results->depthPerComponent = info.GetBitsPerComponent(); |
2050 results->isMonochrome = (results->depthPerComponent == 0); | 2049 results->isMonochrome = (results->depthPerComponent == 0); |
2051 } | 2050 } |
2052 | 2051 |
2053 } // namespace content | 2052 } // namespace content |
OLD | NEW |