Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(944)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2102123002: Make Satisfy/Require callbacks pass Surface id and sequence by reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 case ui::MotionEvent::ACTION_UP: 2012 case ui::MotionEvent::ACTION_UP:
2013 case ui::MotionEvent::ACTION_POINTER_UP: 2013 case ui::MotionEvent::ACTION_POINTER_UP:
2014 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 2014 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
2015 delta.InMicroseconds(), 1, 1000000, 50); 2015 delta.InMicroseconds(), 1, 1000000, 50);
2016 default: 2016 default:
2017 return; 2017 return;
2018 } 2018 }
2019 } 2019 }
2020 2020
2021 } // namespace content 2021 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/offscreen_canvas_surface_impl.cc ('k') | content/renderer/child_frame_compositing_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698