| 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 std::copy(resources.begin(), resources.end(), | 979 std::copy(resources.begin(), resources.end(), |
| 980 std::back_inserter(surface_returned_resources_)); | 980 std::back_inserter(surface_returned_resources_)); |
| 981 if (!ack_callbacks_.size()) | 981 if (!ack_callbacks_.size()) |
| 982 SendReturnedDelegatedResources(last_output_surface_id_); | 982 SendReturnedDelegatedResources(last_output_surface_id_); |
| 983 } | 983 } |
| 984 | 984 |
| 985 void RenderWidgetHostViewAndroid::SetBeginFrameSource( | 985 void RenderWidgetHostViewAndroid::SetBeginFrameSource( |
| 986 cc::SurfaceId surface_id, | 986 cc::SurfaceId surface_id, |
| 987 cc::BeginFrameSource* begin_frame_source) { | 987 cc::BeginFrameSource* begin_frame_source) { |
| 988 // TODO(tansell): Hook this up. | 988 // TODO(tansell): Hook this up. |
| 989 NOTIMPLEMENTED(); | |
| 990 } | 989 } |
| 991 | 990 |
| 992 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { | 991 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { |
| 993 RemoveLayers(); | 992 RemoveLayers(); |
| 994 frame_provider_ = NULL; | 993 frame_provider_ = NULL; |
| 995 if (!surface_id_.is_null()) { | 994 if (!surface_id_.is_null()) { |
| 996 DCHECK(surface_factory_.get()); | 995 DCHECK(surface_factory_.get()); |
| 997 surface_factory_->Destroy(surface_id_); | 996 surface_factory_->Destroy(surface_id_); |
| 998 surface_id_ = cc::SurfaceId(); | 997 surface_id_ = cc::SurfaceId(); |
| 999 } | 998 } |
| (...skipping 1044 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 |