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

Unified Diff: content/browser/renderer_host/delegated_frame_host.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: More Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/delegated_frame_host.cc
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index df479af0112a259e54000e699d091420b50c8b8c..9e523d2cde39d341df94e7cb7cc3cfa3e10b8fa6 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -41,15 +41,15 @@ namespace content {
namespace {
void SatisfyCallback(cc::SurfaceManager* manager,
- cc::SurfaceSequence sequence) {
+ const cc::SurfaceSequence& sequence) {
std::vector<uint32_t> sequences;
sequences.push_back(sequence.sequence);
manager->DidSatisfySequences(sequence.id_namespace, &sequences);
}
void RequireCallback(cc::SurfaceManager* manager,
- cc::SurfaceId id,
- cc::SurfaceSequence sequence) {
+ const cc::SurfaceId& id,
+ const cc::SurfaceSequence& sequence) {
cc::Surface* surface = manager->GetSurfaceForId(id);
if (!surface) {
LOG(ERROR) << "Attempting to require callback on nonexistent surface";
@@ -553,7 +553,7 @@ void DelegatedFrameHost::ReturnResources(
SendReturnedDelegatedResources(last_output_surface_id_);
}
-void DelegatedFrameHost::WillDrawSurface(cc::SurfaceId id,
+void DelegatedFrameHost::WillDrawSurface(const cc::SurfaceId& id,
const gfx::Rect& damage_rect) {
// Frame subscribers are only interested in changes to the target surface, so
// do not attempt capture if |damage_rect| is empty. This prevents the draws

Powered by Google App Engine
This is Rietveld 408576698