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

Side by Side Diff: cc/output/direct_renderer.cc

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: #include and comment cleanup Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/direct_renderer.h" 5 #include "cc/output/direct_renderer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 } 301 }
302 } else { 302 } else {
303 DrawRenderPassAndExecuteCopyRequests(&frame, root_render_pass); 303 DrawRenderPassAndExecuteCopyRequests(&frame, root_render_pass);
304 } 304 }
305 305
306 FinishDrawingFrame(&frame); 306 FinishDrawingFrame(&frame);
307 render_passes_in_draw_order->clear(); 307 render_passes_in_draw_order->clear();
308 } 308 }
309 309
310 bool DirectRenderer::IsResourcePromotable(ResourceId resource_id) {
311 return overlay_processor_->IsResourcePromotable(resource_id);
312 }
313
310 gfx::Rect DirectRenderer::ComputeScissorRectForRenderPass( 314 gfx::Rect DirectRenderer::ComputeScissorRectForRenderPass(
311 const DrawingFrame* frame) { 315 const DrawingFrame* frame) {
312 if (frame->current_render_pass == frame->root_render_pass) 316 if (frame->current_render_pass == frame->root_render_pass)
313 return frame->root_damage_rect; 317 return frame->root_damage_rect;
314 318
315 // If the root damage rect has been expanded due to overlays, all the other 319 // If the root damage rect has been expanded due to overlays, all the other
316 // damage rect calculations are incorrect. 320 // damage rect calculations are incorrect.
317 if (!frame->root_render_pass->damage_rect.Contains(frame->root_damage_rect)) 321 if (!frame->root_render_pass->damage_rect.Contains(frame->root_damage_rect))
318 return frame->current_render_pass->output_rect; 322 return frame->current_render_pass->output_rect;
319 323
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 auto iter = render_pass_textures_.find(id); 576 auto iter = render_pass_textures_.find(id);
573 return iter != render_pass_textures_.end() && iter->second->id(); 577 return iter != render_pass_textures_.end() && iter->second->id();
574 } 578 }
575 579
576 // static 580 // static
577 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 581 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
578 return render_pass->output_rect.size(); 582 return render_pass->output_rect.size();
579 } 583 }
580 584
581 } // namespace cc 585 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698