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

Unified Diff: cc/surfaces/surface.cc

Issue 1673783004: Hook up BeginFrameSource to SurfaceFactoryClient via SurfaceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Register id namespace on Android Created 4 years, 9 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.h ('k') | cc/surfaces/surface_aggregator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface.cc
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
index 6a96230271a674f8cac257171473f2989a5a008f..281a69012a4c9f56d409a01c5c07854bb30206e0 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -39,9 +39,6 @@ Surface::~Surface() {
}
if (!draw_callback_.is_null())
draw_callback_.Run(SurfaceDrawStatus::DRAW_SKIPPED);
-
- if (factory_)
- factory_->SetBeginFrameSource(surface_id_, NULL);
}
void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
@@ -178,34 +175,6 @@ void Surface::SatisfyDestructionDependencies(
destruction_dependencies_.end());
}
-void Surface::AddBeginFrameSource(BeginFrameSource* begin_frame_source) {
- DCHECK(base::STLIsSorted(begin_frame_sources_));
- DCHECK(!ContainsValue(begin_frame_sources_, begin_frame_source))
- << begin_frame_source;
- begin_frame_sources_.insert(begin_frame_source);
- UpdatePrimaryBeginFrameSource();
-}
-
-void Surface::RemoveBeginFrameSource(BeginFrameSource* begin_frame_source) {
- size_t erase_count = begin_frame_sources_.erase(begin_frame_source);
- DCHECK_EQ(1u, erase_count);
- UpdatePrimaryBeginFrameSource();
-}
-
-void Surface::UpdatePrimaryBeginFrameSource() {
- // Ensure the BeginFrameSources are sorted so our we make a stable decision
- // regarding which source is primary.
- // TODO(brianderson): Do something smarter based on coverage instead.
- DCHECK(base::STLIsSorted(begin_frame_sources_));
-
- BeginFrameSource* primary_source = nullptr;
- if (!begin_frame_sources_.empty())
- primary_source = *begin_frame_sources_.begin();
-
- if (factory_)
- factory_->SetBeginFrameSource(surface_id_, primary_source);
-}
-
void Surface::ClearCopyRequests() {
if (current_frame_) {
for (const auto& render_pass :
« no previous file with comments | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_aggregator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698