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

Side by Side Diff: android_webview/browser/surfaces_instance.cc

Issue 2720803002: Pass returned resources to DidReceiveCompositorFrameAck (Closed)
Patch Set: c Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "android_webview/browser/surfaces_instance.h" 5 #include "android_webview/browser/surfaces_instance.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "android_webview/browser/aw_gl_surface.h" 10 #include "android_webview/browser/aw_gl_surface.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 void SurfacesInstance::SetEmptyRootFrame() { 169 void SurfacesInstance::SetEmptyRootFrame() {
170 cc::CompositorFrame empty_frame; 170 cc::CompositorFrame empty_frame;
171 // We draw synchronously, so acknowledge a manual BeginFrame. 171 // We draw synchronously, so acknowledge a manual BeginFrame.
172 empty_frame.metadata.begin_frame_ack = 172 empty_frame.metadata.begin_frame_ack =
173 cc::BeginFrameAck::CreateManualAckWithDamage(); 173 cc::BeginFrameAck::CreateManualAckWithDamage();
174 empty_frame.metadata.referenced_surfaces = child_ids_; 174 empty_frame.metadata.referenced_surfaces = child_ids_;
175 support_->SubmitCompositorFrame(root_id_, std::move(empty_frame)); 175 support_->SubmitCompositorFrame(root_id_, std::move(empty_frame));
176 } 176 }
177 177
178 void SurfacesInstance::DidReceiveCompositorFrameAck() {} 178 void SurfacesInstance::DidReceiveCompositorFrameAck(
179 const cc::ReturnedResourceArray& resources) {
180 ReclaimResources(resources);
181 }
179 182
180 void SurfacesInstance::OnBeginFrame(const cc::BeginFrameArgs& args) {} 183 void SurfacesInstance::OnBeginFrame(const cc::BeginFrameArgs& args) {}
181 184
182 void SurfacesInstance::WillDrawSurface( 185 void SurfacesInstance::WillDrawSurface(
183 const cc::LocalSurfaceId& local_surface_id, 186 const cc::LocalSurfaceId& local_surface_id,
184 const gfx::Rect& damage_rect) {} 187 const gfx::Rect& damage_rect) {}
185 188
186 void SurfacesInstance::ReclaimResources( 189 void SurfacesInstance::ReclaimResources(
187 const cc::ReturnedResourceArray& resources) { 190 const cc::ReturnedResourceArray& resources) {
188 // Root surface should have no resources to return. 191 // Root surface should have no resources to return.
189 CHECK(resources.empty()); 192 CHECK(resources.empty());
190 } 193 }
191 194
192 } // namespace android_webview 195 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698