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

Unified Diff: cc/quads/render_pass.h

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: Address review comments 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.h
diff --git a/cc/quads/render_pass.h b/cc/quads/render_pass.h
index 7859ac323ae6776eae4ba0de2c5f27df697a8c2f..2ecfae0989360481387b1f93caca8e135f7e909d 100644
--- a/cc/quads/render_pass.h
+++ b/cc/quads/render_pass.h
@@ -16,6 +16,7 @@
#include "base/macros.h"
#include "cc/base/cc_export.h"
#include "cc/base/list_container.h"
+#include "cc/output/filter_operations.h"
#include "cc/quads/draw_quad.h"
#include "cc/quads/largest_draw_quad.h"
#include "cc/quads/render_pass_id.h"
@@ -83,6 +84,8 @@ class CC_EXPORT RenderPass {
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);
void AsValueInto(base::trace_event::TracedValue* dict) const;
@@ -112,6 +115,13 @@ class CC_EXPORT RenderPass {
// render pass' |output_rect|.
gfx::Transform transform_to_root_target;
+ // Post-processing filters, applied to the pixels in the render pass' texture.
+ FilterOperations filters;
+
+ // Post-processing filters, applied to the pixels showing through the
+ // background of the render pass, from behind it.
+ FilterOperations background_filters;
+
// If false, the pixels in the render pass' texture are all opaque.
bool has_transparent_background;
@@ -141,6 +151,15 @@ class CC_EXPORT RenderPass {
using RenderPassList = std::vector<std::unique_ptr<RenderPass>>;
using RenderPassIdHashMap =
std::unordered_map<RenderPassId, RenderPass*, RenderPassIdHash>;
+using RenderPassFilterList =
danakj 2016/12/14 23:23:57 I think we need to either mention here that this i
ajuma 2016/12/15 16:49:20 Added a comment here.
+ std::vector<std::pair<RenderPassId, FilterOperations*>>;
+class RenderPassFilterListComparator {
+ public:
+ bool operator()(const std::pair<RenderPassId, FilterOperations*>& a,
+ const std::pair<RenderPassId, FilterOperations*>& b) {
+ return a.first < b.first;
+ }
+};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698