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

Unified Diff: cc/surfaces/display.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Created 3 years, 7 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
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 1f4c9d1abca99d3be4573db1707150fa41af6c19..dd9494b970d46cc2375b6079d59a73ea6ecf004b 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -277,8 +277,10 @@ bool Display::DrawAndSwap() {
stored_latency_info_.end());
stored_latency_info_.clear();
bool have_copy_requests = false;
+ bool force_render_surface = false;
for (const auto& pass : frame.render_pass_list) {
have_copy_requests |= !pass->copy_requests.empty();
+ force_render_surface |= pass->force_render_surface;
}
gfx::Size surface_size;
@@ -299,7 +301,8 @@ bool Display::DrawAndSwap() {
if (!size_matches)
TRACE_EVENT_INSTANT0("cc", "Size mismatch.", TRACE_EVENT_SCOPE_THREAD);
- bool should_draw = have_copy_requests || (have_damage && size_matches);
+ bool should_draw = force_render_surface || have_copy_requests ||
reveman 2017/05/10 13:06:17 hm, I don't think this should force a draw. copy r
wutao 2017/05/11 19:36:34 Right.
+ (have_damage && size_matches);
// If the surface is suspended then the resources to be used by the draw are
// likely destroyed.

Powered by Google App Engine
This is Rietveld 408576698