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

Unified Diff: cc/output/direct_renderer.cc

Issue 2776923003: cc: Partial draw without partial swap support. (Closed)
Patch Set: avoid BufferQueue::RecreateBuffer changes Created 3 years, 8 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/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index e9b62d29587bfdec92dd74dbb2f73f9aac87266f..78c34c84d10317fb6a65a1946fac09416c5989c6 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -337,15 +337,14 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
current_frame()->root_render_pass->output_rect;
}
+ allow_partial_draw_ =
+ use_partial_swap_ ||
+ output_surface_->CanPartialDraw(current_frame()->root_damage_rect);
+
// We can skip all drawing if the damage rect is now empty.
bool skip_drawing_root_render_pass =
current_frame()->root_damage_rect.IsEmpty() && allow_empty_swap_;
- // If we have to draw but don't support partial swap, the whole output should
- // be considered damaged.
- if (!skip_drawing_root_render_pass && !use_partial_swap_)
- current_frame()->root_damage_rect = root_render_pass->output_rect;
-
if (skip_drawing_root_render_pass) {
// If any of the overlays is the output surface, then ensure that the
// backbuffer be allocated (allocation of the backbuffer is a side-effect
@@ -532,7 +531,7 @@ void DirectRenderer::DrawRenderPass(const RenderPass* render_pass) {
DeviceViewportRectInDrawSpace());
}
- if (use_partial_swap_) {
+ if (allow_partial_draw_) {
render_pass_scissor_in_draw_space.Intersect(
current_frame()->ComputeScissorRectForRenderPass());
}
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698