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

Unified Diff: components/mus/surfaces/top_level_display_client.cc

Issue 1328953003: Mandoline: Support transforms and clipping of OOPIFs and events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO Created 5 years, 3 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 | « components/mus/surfaces/top_level_display_client.h ('k') | components/mus/view_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/surfaces/top_level_display_client.cc
diff --git a/components/mus/surfaces/top_level_display_client.cc b/components/mus/surfaces/top_level_display_client.cc
index 5f225f9a3bf131d4ce5ca258acd22d66a85f0f89..d7ec91e8688f834bb9c96d4de6055dfd82b9e61e 100644
--- a/components/mus/surfaces/top_level_display_client.cc
+++ b/components/mus/surfaces/top_level_display_client.cc
@@ -6,6 +6,7 @@
#include "cc/output/compositor_frame.h"
#include "cc/surfaces/display.h"
+#include "cc/surfaces/surface.h"
#include "components/mus/gles2/gpu_state.h"
#include "components/mus/surfaces/surfaces_context_provider.h"
#include "components/mus/surfaces/surfaces_output_surface.h"
@@ -46,13 +47,11 @@ TopLevelDisplayClient::TopLevelDisplayClient(
}
TopLevelDisplayClient::~TopLevelDisplayClient() {
- if (display_) {
- factory_.Destroy(cc_id_);
- surfaces_state_->scheduler()->RemoveDisplay(display_.get());
- // By deleting the object after display_ is reset, OutputSurfaceLost can
- // know not to do anything (which would result in double delete).
- delete display_.release();
- }
+ factory_.Destroy(cc_id_);
+ surfaces_state_->scheduler()->RemoveDisplay(display_.get());
+ // By deleting the object after display_ is reset, OutputSurfaceLost can
+ // know not to do anything (which would result in double delete).
+ delete display_.release();
}
void TopLevelDisplayClient::SubmitCompositorFrame(
@@ -69,6 +68,14 @@ void TopLevelDisplayClient::SubmitCompositorFrame(
surfaces_state_->scheduler()->SetNeedsDraw();
}
+const cc::CompositorFrame*
+TopLevelDisplayClient::GetLastCompositorFrame() const {
+ cc::Surface* surface = surfaces_state_->manager()->GetSurfaceForId(cc_id_);
+ if (!surface)
+ return nullptr;
+ return surface->GetEligibleFrame();
+}
+
void TopLevelDisplayClient::CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval) {}
« no previous file with comments | « components/mus/surfaces/top_level_display_client.h ('k') | components/mus/view_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698