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

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

Issue 843633003: Enable partial texture upload support for browser compositor with Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « content/browser/compositor/surface_display_output_surface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/surface_display_output_surface.cc
diff --git a/content/browser/compositor/surface_display_output_surface.cc b/content/browser/compositor/surface_display_output_surface.cc
index f80d14f76dc5f3805cff765899f9c1a8c75ad296..61eee552f7781693389edcd815376e0d581f24db 100644
--- a/content/browser/compositor/surface_display_output_surface.cc
+++ b/content/browser/compositor/surface_display_output_surface.cc
@@ -25,6 +25,7 @@ SurfaceDisplayOutputSurface::SurfaceDisplayOutputSurface(
allocator_(allocator) {
capabilities_.delegated_rendering = true;
capabilities_.max_frames_pending = 1;
+ capabilities_.can_force_reclaim_resources = true;
}
SurfaceDisplayOutputSurface::~SurfaceDisplayOutputSurface() {
@@ -75,6 +76,15 @@ bool SurfaceDisplayOutputSurface::BindToClient(
return display_client_->Initialize();
}
+void SurfaceDisplayOutputSurface::ForceReclaimResources() {
+ if (!surface_id_.is_null()) {
+ scoped_ptr<cc::CompositorFrame> empty_frame(new cc::CompositorFrame());
+ empty_frame->delegated_frame_data.reset(new cc::DelegatedFrameData);
+ factory_.SubmitFrame(surface_id_, empty_frame.Pass(),
+ cc::SurfaceFactory::DrawCallback());
+ }
+}
+
void SurfaceDisplayOutputSurface::ReturnResources(
const cc::ReturnedResourceArray& resources) {
cc::CompositorFrameAck ack;
« no previous file with comments | « content/browser/compositor/surface_display_output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698