| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 host_->SetBackgroundOpaque(GetBackgroundOpaque()); | 812 host_->SetBackgroundOpaque(GetBackgroundOpaque()); |
| 813 UpdateBackgroundColor(color); | 813 UpdateBackgroundColor(color); |
| 814 } | 814 } |
| 815 | 815 |
| 816 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( | 816 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( |
| 817 const gfx::Rect& src_subrect, | 817 const gfx::Rect& src_subrect, |
| 818 const gfx::Size& dst_size, | 818 const gfx::Size& dst_size, |
| 819 const ReadbackRequestCallback& callback, | 819 const ReadbackRequestCallback& callback, |
| 820 const SkColorType preferred_color_type) { | 820 const SkColorType preferred_color_type) { |
| 821 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); | 821 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); |
| 822 if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) { | 822 if (!host_ || !IsSurfaceAvailableForCopy()) { |
| 823 callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); | 823 callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); |
| 824 return; | 824 return; |
| 825 } | 825 } |
| 826 if (!content_view_core_ || !(content_view_core_->GetWindowAndroid())) { | 826 if (!content_view_core_ || !(content_view_core_->GetWindowAndroid())) { |
| 827 callback.Run(SkBitmap(), READBACK_FAILED); | 827 callback.Run(SkBitmap(), READBACK_FAILED); |
| 828 return; | 828 return; |
| 829 } | 829 } |
| 830 | 830 |
| 831 base::TimeTicks start_time = base::TimeTicks::Now(); | 831 base::TimeTicks start_time = base::TimeTicks::Now(); |
| 832 const display::Display& display = | 832 const display::Display& display = |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 case ui::MotionEvent::ACTION_UP: | 1862 case ui::MotionEvent::ACTION_UP: |
| 1863 case ui::MotionEvent::ACTION_POINTER_UP: | 1863 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1864 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1864 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1865 delta.InMicroseconds(), 1, 1000000, 50); | 1865 delta.InMicroseconds(), 1, 1000000, 50); |
| 1866 default: | 1866 default: |
| 1867 return; | 1867 return; |
| 1868 } | 1868 } |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 } // namespace content | 1871 } // namespace content |
| OLD | NEW |