| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #include "ui/gfx/android/view_configuration.h" | 89 #include "ui/gfx/android/view_configuration.h" |
| 90 #include "ui/gfx/geometry/dip_util.h" | 90 #include "ui/gfx/geometry/dip_util.h" |
| 91 #include "ui/gfx/geometry/size_conversions.h" | 91 #include "ui/gfx/geometry/size_conversions.h" |
| 92 #include "ui/touch_selection/touch_selection_controller.h" | 92 #include "ui/touch_selection/touch_selection_controller.h" |
| 93 | 93 |
| 94 namespace content { | 94 namespace content { |
| 95 | 95 |
| 96 namespace { | 96 namespace { |
| 97 | 97 |
| 98 void SatisfyCallback(cc::SurfaceManager* manager, | 98 void SatisfyCallback(cc::SurfaceManager* manager, |
| 99 cc::SurfaceSequence sequence) { | 99 const cc::SurfaceSequence& sequence) { |
| 100 std::vector<uint32_t> sequences; | 100 std::vector<uint32_t> sequences; |
| 101 sequences.push_back(sequence.sequence); | 101 sequences.push_back(sequence.sequence); |
| 102 manager->DidSatisfySequences(sequence.id_namespace, &sequences); | 102 manager->DidSatisfySequences(sequence.id_namespace, &sequences); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void RequireCallback(cc::SurfaceManager* manager, | 105 void RequireCallback(cc::SurfaceManager* manager, |
| 106 cc::SurfaceId id, | 106 const cc::SurfaceId& id, |
| 107 cc::SurfaceSequence sequence) { | 107 const cc::SurfaceSequence& sequence) { |
| 108 cc::Surface* surface = manager->GetSurfaceForId(id); | 108 cc::Surface* surface = manager->GetSurfaceForId(id); |
| 109 if (!surface) { | 109 if (!surface) { |
| 110 LOG(ERROR) << "Attempting to require callback on nonexistent surface"; | 110 LOG(ERROR) << "Attempting to require callback on nonexistent surface"; |
| 111 return; | 111 return; |
| 112 } | 112 } |
| 113 surface->AddDestructionDependency(sequence); | 113 surface->AddDestructionDependency(sequence); |
| 114 } | 114 } |
| 115 | 115 |
| 116 const int kUndefinedOutputSurfaceId = -1; | 116 const int kUndefinedOutputSurfaceId = -1; |
| 117 | 117 |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 case ui::MotionEvent::ACTION_UP: | 2022 case ui::MotionEvent::ACTION_UP: |
| 2023 case ui::MotionEvent::ACTION_POINTER_UP: | 2023 case ui::MotionEvent::ACTION_POINTER_UP: |
| 2024 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 2024 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 2025 delta.InMicroseconds(), 1, 1000000, 50); | 2025 delta.InMicroseconds(), 1, 1000000, 50); |
| 2026 default: | 2026 default: |
| 2027 return; | 2027 return; |
| 2028 } | 2028 } |
| 2029 } | 2029 } |
| 2030 | 2030 |
| 2031 } // namespace content | 2031 } // namespace content |
| OLD | NEW |