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

Unified Diff: cc/quads/render_pass.cc

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: Created 4 years 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/quads/render_pass.cc
diff --git a/cc/quads/render_pass.cc b/cc/quads/render_pass.cc
index 6ce19bf14164788365330dbadf1882c74073e17b..5e9741c4b3d0e4f5d5755907439a60c403dc157c 100644
--- a/cc/quads/render_pass.cc
+++ b/cc/quads/render_pass.cc
@@ -91,11 +91,8 @@ RenderPass::~RenderPass() {
std::unique_ptr<RenderPass> RenderPass::Copy(RenderPassId new_id) const {
std::unique_ptr<RenderPass> copy_pass(
Create(shared_quad_state_list.size(), quad_list.size()));
- copy_pass->SetAll(new_id,
- output_rect,
- damage_rect,
- transform_to_root_target,
- has_transparent_background);
+ copy_pass->SetAll(new_id, output_rect, damage_rect, transform_to_root_target,
+ filters, background_filters, has_transparent_background);
return copy_pass;
}
@@ -107,7 +104,7 @@ std::unique_ptr<RenderPass> RenderPass::DeepCopy() const {
std::unique_ptr<RenderPass> copy_pass(
Create(shared_quad_state_list.size(), quad_list.size()));
copy_pass->SetAll(id, output_rect, damage_rect, transform_to_root_target,
- has_transparent_background);
+ filters, background_filters, has_transparent_background);
for (auto* shared_quad_state : shared_quad_state_list) {
SharedQuadState* copy_shared_quad_state =
copy_pass->CreateAndAppendSharedQuadState();
@@ -148,7 +145,9 @@ void RenderPass::CopyAll(const std::vector<std::unique_ptr<RenderPass>>& in,
void RenderPass::SetNew(RenderPassId id,
const gfx::Rect& output_rect,
const gfx::Rect& damage_rect,
- const gfx::Transform& transform_to_root_target) {
+ const gfx::Transform& transform_to_root_target,
+ const FilterOperations& filters,
+ const FilterOperations& background_filters) {
DCHECK(id.IsValid());
DCHECK(damage_rect.IsEmpty() || output_rect.Contains(damage_rect))
<< "damage_rect: " << damage_rect.ToString()
@@ -158,6 +157,8 @@ void RenderPass::SetNew(RenderPassId id,
this->output_rect = output_rect;
this->damage_rect = damage_rect;
this->transform_to_root_target = transform_to_root_target;
+ this->filters = filters;
+ this->background_filters = background_filters;
DCHECK(quad_list.empty());
DCHECK(shared_quad_state_list.empty());
@@ -167,6 +168,8 @@ void RenderPass::SetAll(RenderPassId id,
const gfx::Rect& output_rect,
const gfx::Rect& damage_rect,
const gfx::Transform& transform_to_root_target,
+ const FilterOperations& filters,
+ const FilterOperations& background_filters,
bool has_transparent_background) {
DCHECK(id.IsValid());
@@ -174,6 +177,8 @@ void RenderPass::SetAll(RenderPassId id,
this->output_rect = output_rect;
this->damage_rect = damage_rect;
this->transform_to_root_target = transform_to_root_target;
+ this->filters = filters;
+ this->background_filters = background_filters;
this->has_transparent_background = has_transparent_background;
DCHECK(quad_list.empty());
@@ -188,6 +193,14 @@ void RenderPass::AsValueInto(base::trace_event::TracedValue* value) const {
value->SetInteger("copy_requests",
base::saturated_cast<int>(copy_requests.size()));
+ value->BeginArray("filters");
+ filters.AsValueInto(value);
+ value->EndArray();
+
+ value->BeginArray("background_filters");
+ background_filters.AsValueInto(value);
+ value->EndArray();
+
value->BeginArray("shared_quad_state_list");
for (auto* shared_quad_state : shared_quad_state_list) {
value->BeginDictionary();

Powered by Google App Engine
This is Rietveld 408576698