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

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: Rebase 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 9a84189935b50063f907ed8a35cba9d37010036a..025277712f85434e7f0590d9c556b4378e25fa28 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";
@@ -551,7 +551,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
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.h ('k') | content/browser/renderer_host/offscreen_canvas_surface_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698