| 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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 result->size(), | 1410 result->size(), |
| 1411 gfx::Rect(result->size()), | 1411 gfx::Rect(result->size()), |
| 1412 dst_size_in_pixel, | 1412 dst_size_in_pixel, |
| 1413 pixels, | 1413 pixels, |
| 1414 bitmap_config, | 1414 bitmap_config, |
| 1415 base::Bind(&CopyFromCompositingSurfaceFinished, | 1415 base::Bind(&CopyFromCompositingSurfaceFinished, |
| 1416 callback, | 1416 callback, |
| 1417 base::Passed(&release_callback), | 1417 base::Passed(&release_callback), |
| 1418 base::Passed(&bitmap), | 1418 base::Passed(&bitmap), |
| 1419 start_time, | 1419 start_time, |
| 1420 base::Passed(&bitmap_pixels_lock))); | 1420 base::Passed(&bitmap_pixels_lock)), |
| 1421 GLHelper::SCALER_QUALITY_GOOD); |
| 1421 } | 1422 } |
| 1422 | 1423 |
| 1423 bool RenderWidgetHostViewAndroid::IsReadbackConfigSupported( | 1424 bool RenderWidgetHostViewAndroid::IsReadbackConfigSupported( |
| 1424 SkBitmap::Config bitmap_config) { | 1425 SkBitmap::Config bitmap_config) { |
| 1425 ImageTransportFactoryAndroid* factory = | 1426 ImageTransportFactoryAndroid* factory = |
| 1426 ImageTransportFactoryAndroid::GetInstance(); | 1427 ImageTransportFactoryAndroid::GetInstance(); |
| 1427 GLHelper* gl_helper = factory->GetGLHelper(); | 1428 GLHelper* gl_helper = factory->GetGLHelper(); |
| 1428 if (!gl_helper) | 1429 if (!gl_helper) |
| 1429 return false; | 1430 return false; |
| 1430 return gl_helper->IsReadbackConfigSupported(bitmap_config); | 1431 return gl_helper->IsReadbackConfigSupported(bitmap_config); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1451 results->availableRect = display.work_area(); | 1452 results->availableRect = display.work_area(); |
| 1452 results->deviceScaleFactor = display.device_scale_factor(); | 1453 results->deviceScaleFactor = display.device_scale_factor(); |
| 1453 results->orientationAngle = display.RotationAsDegree(); | 1454 results->orientationAngle = display.RotationAsDegree(); |
| 1454 gfx::DeviceDisplayInfo info; | 1455 gfx::DeviceDisplayInfo info; |
| 1455 results->depth = info.GetBitsPerPixel(); | 1456 results->depth = info.GetBitsPerPixel(); |
| 1456 results->depthPerComponent = info.GetBitsPerComponent(); | 1457 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1457 results->isMonochrome = (results->depthPerComponent == 0); | 1458 results->isMonochrome = (results->depthPerComponent == 0); |
| 1458 } | 1459 } |
| 1459 | 1460 |
| 1460 } // namespace content | 1461 } // namespace content |
| OLD | NEW |