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

Unified Diff: cc/surfaces/surface.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo 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 | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_aggregator.cc » ('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 98ae58c0f3bcb2773c883f151101ee2c4ac125d6..25f3114d51c32dcaab3da485f3d359453e4d6bee 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -34,7 +34,7 @@ Surface::~Surface() {
factory_->UnrefResources(current_resources);
}
if (!draw_callback_.is_null())
- draw_callback_.Run(false);
+ draw_callback_.Run(SurfaceDrawStatus::DRAW_SKIPPED);
}
void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
@@ -56,7 +56,7 @@ void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
factory_->UnrefResources(previous_resources);
}
if (!draw_callback_.is_null())
- draw_callback_.Run(false);
+ draw_callback_.Run(SurfaceDrawStatus::DRAW_SKIPPED);
draw_callback_ = callback;
factory_->manager()->DidSatisfySequences(
SurfaceIdAllocator::NamespaceForId(surface_id_),
@@ -106,11 +106,11 @@ void Surface::TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info) {
current_frame_->metadata.latency_info.clear();
}
-void Surface::RunDrawCallbacks() {
+void Surface::RunDrawCallbacks(SurfaceDrawStatus drawn) {
if (!draw_callback_.is_null()) {
DrawCallback callback = draw_callback_;
draw_callback_ = DrawCallback();
- callback.Run(true);
+ callback.Run(drawn);
}
}
« no previous file with comments | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698