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

Unified Diff: cc/quads/render_pass.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. Created 3 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/quads/render_pass.h ('k') | cc/quads/render_pass_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/render_pass.cc
diff --git a/cc/quads/render_pass.cc b/cc/quads/render_pass.cc
index a4e458c544f3360931d7ca2dc3e6d9a0552c1f9a..957613e78d4da3aa9c73f227a319c5af1c29aea4 100644
--- a/cc/quads/render_pass.cc
+++ b/cc/quads/render_pass.cc
@@ -71,6 +71,8 @@ RenderPass::RenderPass()
// is a good hint for what to reserve here.
RenderPass::RenderPass(size_t num_layers)
: has_transparent_background(true),
+ cache_render_pass(false),
+ has_damage_from_contributing_content(false),
quad_list(kDefaultNumQuadsToReserve),
shared_quad_state_list(alignof(SharedQuadState),
sizeof(SharedQuadState),
@@ -79,6 +81,8 @@ RenderPass::RenderPass(size_t num_layers)
RenderPass::RenderPass(size_t shared_quad_state_list_size,
size_t quad_list_size)
: has_transparent_background(true),
+ cache_render_pass(false),
+ has_damage_from_contributing_content(false),
quad_list(quad_list_size),
shared_quad_state_list(alignof(SharedQuadState),
sizeof(SharedQuadState),
@@ -95,7 +99,8 @@ std::unique_ptr<RenderPass> RenderPass::Copy(int new_id) const {
Create(shared_quad_state_list.size(), quad_list.size()));
copy_pass->SetAll(new_id, output_rect, damage_rect, transform_to_root_target,
filters, background_filters, color_space,
- has_transparent_background);
+ has_transparent_background, cache_render_pass,
+ has_damage_from_contributing_content);
return copy_pass;
}
@@ -108,7 +113,8 @@ std::unique_ptr<RenderPass> RenderPass::DeepCopy() const {
Create(shared_quad_state_list.size(), quad_list.size()));
copy_pass->SetAll(id, output_rect, damage_rect, transform_to_root_target,
filters, background_filters, color_space,
- has_transparent_background);
+ has_transparent_background, cache_render_pass,
+ has_damage_from_contributing_content);
for (auto* shared_quad_state : shared_quad_state_list) {
SharedQuadState* copy_shared_quad_state =
copy_pass->CreateAndAppendSharedQuadState();
@@ -171,7 +177,9 @@ void RenderPass::SetAll(uint64_t id,
const FilterOperations& filters,
const FilterOperations& background_filters,
const gfx::ColorSpace& color_space,
- bool has_transparent_background) {
+ bool has_transparent_background,
+ bool cache_render_pass,
+ bool has_damage_from_contributing_content) {
DCHECK(id);
this->id = id;
@@ -182,6 +190,9 @@ void RenderPass::SetAll(uint64_t id,
this->background_filters = background_filters;
this->color_space = color_space;
this->has_transparent_background = has_transparent_background;
+ this->cache_render_pass = cache_render_pass;
+ this->has_damage_from_contributing_content =
+ has_damage_from_contributing_content;
DCHECK(quad_list.empty());
DCHECK(shared_quad_state_list.empty());
@@ -192,6 +203,9 @@ void RenderPass::AsValueInto(base::trace_event::TracedValue* value) const {
MathUtil::AddToTracedValue("damage_rect", damage_rect, value);
value->SetBoolean("has_transparent_background", has_transparent_background);
+ value->SetBoolean("cache_render_pass", cache_render_pass);
+ value->SetBoolean("has_damage_from_contributing_content",
+ has_damage_from_contributing_content);
value->SetInteger("copy_requests",
base::saturated_cast<int>(copy_requests.size()));
« no previous file with comments | « cc/quads/render_pass.h ('k') | cc/quads/render_pass_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698