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/sys_utils.h" | 9 #include "base/android/sys_utils.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 247 } |
248 | 248 |
249 void RenderWidgetHostViewAndroid::WasShown() { | 249 void RenderWidgetHostViewAndroid::WasShown() { |
250 if (!host_ || !host_->is_hidden()) | 250 if (!host_ || !host_->is_hidden()) |
251 return; | 251 return; |
252 | 252 |
253 host_->WasShown(); | 253 host_->WasShown(); |
254 | 254 |
255 if (content_view_core_ && !using_synchronous_compositor_) { | 255 if (content_view_core_ && !using_synchronous_compositor_) { |
256 content_view_core_->GetWindowAndroid()->AddObserver(this); | 256 content_view_core_->GetWindowAndroid()->AddObserver(this); |
| 257 content_view_core_->GetWindowAndroid()->RequestVSyncUpdate(); |
257 observing_root_window_ = true; | 258 observing_root_window_ = true; |
258 } | 259 } |
259 } | 260 } |
260 | 261 |
261 void RenderWidgetHostViewAndroid::WasHidden() { | 262 void RenderWidgetHostViewAndroid::WasHidden() { |
262 RunAckCallbacks(); | 263 RunAckCallbacks(); |
263 | 264 |
264 if (!host_ || host_->is_hidden()) | 265 if (!host_ || host_->is_hidden()) |
265 return; | 266 return; |
266 | 267 |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 results->availableRect = display.work_area(); | 1457 results->availableRect = display.work_area(); |
1457 results->deviceScaleFactor = display.device_scale_factor(); | 1458 results->deviceScaleFactor = display.device_scale_factor(); |
1458 results->orientationAngle = display.RotationAsDegree(); | 1459 results->orientationAngle = display.RotationAsDegree(); |
1459 gfx::DeviceDisplayInfo info; | 1460 gfx::DeviceDisplayInfo info; |
1460 results->depth = info.GetBitsPerPixel(); | 1461 results->depth = info.GetBitsPerPixel(); |
1461 results->depthPerComponent = info.GetBitsPerComponent(); | 1462 results->depthPerComponent = info.GetBitsPerComponent(); |
1462 results->isMonochrome = (results->depthPerComponent == 0); | 1463 results->isMonochrome = (results->depthPerComponent == 0); |
1463 } | 1464 } |
1464 | 1465 |
1465 } // namespace content | 1466 } // namespace content |
OLD | NEW |