| 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 | 787 |
| 788 void RenderWidgetHostViewAndroid::UpdateBackgroundColor(SkColor color) { | 788 void RenderWidgetHostViewAndroid::UpdateBackgroundColor(SkColor color) { |
| 789 if (cached_background_color_ == color) | 789 if (cached_background_color_ == color) |
| 790 return; | 790 return; |
| 791 | 791 |
| 792 cached_background_color_ = color; | 792 cached_background_color_ = color; |
| 793 | 793 |
| 794 if (delegated_frame_host_) | 794 if (delegated_frame_host_) |
| 795 delegated_frame_host_->UpdateBackgroundColor(color); | 795 delegated_frame_host_->UpdateBackgroundColor(color); |
| 796 | 796 |
| 797 if (content_view_core_) | 797 view_.OnBackgroundColorChanged(color); |
| 798 content_view_core_->OnBackgroundColorChanged(color); | |
| 799 } | 798 } |
| 800 | 799 |
| 801 void RenderWidgetHostViewAndroid::SetNeedsBeginFrames(bool needs_begin_frames) { | 800 void RenderWidgetHostViewAndroid::SetNeedsBeginFrames(bool needs_begin_frames) { |
| 802 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SetNeedsBeginFrames", | 801 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SetNeedsBeginFrames", |
| 803 "needs_begin_frames", needs_begin_frames); | 802 "needs_begin_frames", needs_begin_frames); |
| 804 if (needs_begin_frames) | 803 if (needs_begin_frames) |
| 805 RequestVSyncUpdate(PERSISTENT_BEGIN_FRAME); | 804 RequestVSyncUpdate(PERSISTENT_BEGIN_FRAME); |
| 806 else | 805 else |
| 807 outstanding_vsync_requests_ &= ~PERSISTENT_BEGIN_FRAME; | 806 outstanding_vsync_requests_ &= ~PERSISTENT_BEGIN_FRAME; |
| 808 } | 807 } |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 case ui::MotionEvent::ACTION_UP: | 1989 case ui::MotionEvent::ACTION_UP: |
| 1991 case ui::MotionEvent::ACTION_POINTER_UP: | 1990 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1992 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1991 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1993 delta.InMicroseconds(), 1, 1000000, 50); | 1992 delta.InMicroseconds(), 1, 1000000, 50); |
| 1994 default: | 1993 default: |
| 1995 return; | 1994 return; |
| 1996 } | 1995 } |
| 1997 } | 1996 } |
| 1998 | 1997 |
| 1999 } // namespace content | 1998 } // namespace content |
| OLD | NEW |