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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 host_->SetBackgroundOpaque(GetBackgroundOpaque()); | 857 host_->SetBackgroundOpaque(GetBackgroundOpaque()); |
858 UpdateBackgroundColor(color); | 858 UpdateBackgroundColor(color); |
859 } | 859 } |
860 | 860 |
861 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( | 861 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( |
862 const gfx::Rect& src_subrect, | 862 const gfx::Rect& src_subrect, |
863 const gfx::Size& dst_size, | 863 const gfx::Size& dst_size, |
864 const ReadbackRequestCallback& callback, | 864 const ReadbackRequestCallback& callback, |
865 const SkColorType preferred_color_type) { | 865 const SkColorType preferred_color_type) { |
866 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); | 866 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); |
867 if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) { | 867 if (!host_ || !IsSurfaceAvailableForCopy()) { |
868 callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); | 868 callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); |
869 return; | 869 return; |
870 } | 870 } |
871 if (!content_view_core_ || !(content_view_core_->GetWindowAndroid())) { | 871 if (!content_view_core_ || !(content_view_core_->GetWindowAndroid())) { |
872 callback.Run(SkBitmap(), READBACK_FAILED); | 872 callback.Run(SkBitmap(), READBACK_FAILED); |
873 return; | 873 return; |
874 } | 874 } |
875 | 875 |
876 base::TimeTicks start_time = base::TimeTicks::Now(); | 876 base::TimeTicks start_time = base::TimeTicks::Now(); |
877 const display::Display& display = | 877 const display::Display& display = |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 case ui::MotionEvent::ACTION_UP: | 1974 case ui::MotionEvent::ACTION_UP: |
1975 case ui::MotionEvent::ACTION_POINTER_UP: | 1975 case ui::MotionEvent::ACTION_POINTER_UP: |
1976 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1976 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
1977 delta.InMicroseconds(), 1, 1000000, 50); | 1977 delta.InMicroseconds(), 1, 1000000, 50); |
1978 default: | 1978 default: |
1979 return; | 1979 return; |
1980 } | 1980 } |
1981 } | 1981 } |
1982 | 1982 |
1983 } // namespace content | 1983 } // namespace content |
OLD | NEW |