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

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 509193002: Allow requesting a copy of a surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/delegated_frame_host.cc
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index 488b138b772e158b706c4e870f7a43c45bc738ae..26a0b297369768c0872fcf15191a3f16f6780392 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -131,8 +131,10 @@ bool DelegatedFrameHost::ShouldCreateResizeLock() {
void DelegatedFrameHost::RequestCopyOfOutput(
scoped_ptr<cc::CopyOutputRequest> request) {
if (use_surfaces_) {
- // TODO(jbauman): Make this work with surfaces.
- request->SendEmptyResult();
+ if (surface_factory_ && !surface_id_.is_null())
+ surface_factory_->RequestCopyOfSurface(surface_id_, request.Pass());
+ else
+ request->SendEmptyResult();
} else {
client_->GetLayer()->RequestCopyOfOutput(request.Pass());
}
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698