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

Unified Diff: cc/surfaces/surface_factory.cc

Issue 1251823005: cc: Make DisplayScheduler aware of resize and add tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests; small logic changes Created 5 years, 5 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/display_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory.cc
diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
index 9bb50ace4c29acd2c46ea28b6ba0e898558f09d6..1681c41de97d53c504656a39c1b25ebeb4a1cea1 100644
--- a/cc/surfaces/surface_factory.cc
+++ b/cc/surfaces/surface_factory.cc
@@ -4,6 +4,7 @@
#include "cc/surfaces/surface_factory.h"
+#include "base/trace_event/trace_event.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/copy_output_request.h"
#include "cc/surfaces/surface.h"
@@ -50,12 +51,15 @@ void SurfaceFactory::Destroy(SurfaceId surface_id) {
void SurfaceFactory::SubmitFrame(SurfaceId surface_id,
scoped_ptr<CompositorFrame> frame,
const DrawCallback& callback) {
+ TRACE_EVENT0("cc", "SurfaceFactory::SubmitFrame");
OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
DCHECK(it != surface_map_.end());
DCHECK(it->second->factory().get() == this);
it->second->QueueFrame(frame.Pass(), callback);
- if (!manager_->SurfaceModified(surface_id))
+ if (!manager_->SurfaceModified(surface_id)) {
+ TRACE_EVENT_INSTANT0("cc", "Damage not visible.", TRACE_EVENT_SCOPE_THREAD);
it->second->RunDrawCallbacks(SurfaceDrawStatus::DRAW_SKIPPED);
+ }
}
void SurfaceFactory::RequestCopyOfSurface(
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698