1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_VIZ_COMMON_QUADS_AGGREGATED_RENDER_PASS_DRAW_QUAD_H_
6 #define COMPONENTS_VIZ_COMMON_QUADS_AGGREGATED_RENDER_PASS_DRAW_QUAD_H_
7 
8 #include <stddef.h>
9 
10 #include <memory>
11 
12 #include "cc/paint/filter_operations.h"
13 #include "components/viz/common/quads/aggregated_render_pass.h"
14 #include "components/viz/common/quads/draw_quad.h"
15 #include "components/viz/common/quads/render_pass_draw_quad_internal.h"
16 #include "components/viz/common/viz_common_export.h"
17 
18 #include "ui/gfx/geometry/point_f.h"
19 #include "ui/gfx/geometry/rect_f.h"
20 
21 namespace viz {
22 
23 class VIZ_COMMON_EXPORT AggregatedRenderPassDrawQuad
24     : public RenderPassDrawQuadInternal {
25  public:
26   AggregatedRenderPassDrawQuad();
27   AggregatedRenderPassDrawQuad(const AggregatedRenderPassDrawQuad& other);
28   ~AggregatedRenderPassDrawQuad() override;
29 
30   void SetNew(const SharedQuadState* shared_quad_state,
31               const gfx::Rect& rect,
32               const gfx::Rect& visible_rect,
33               AggregatedRenderPassId render_pass_id,
34               ResourceId mask_resource_id,
35               const gfx::RectF& mask_uv_rect,
36               const gfx::Size& mask_texture_size,
37               const gfx::Vector2dF& filters_scale,
38               const gfx::PointF& filters_origin,
39               const gfx::RectF& tex_coord_rect,
40               bool force_anti_aliasing_off,
41               float backdrop_filter_quality);
42 
43   void SetAll(const SharedQuadState* shared_quad_state,
44               const gfx::Rect& rect,
45               const gfx::Rect& visible_rect,
46               bool needs_blending,
47               AggregatedRenderPassId render_pass_id,
48               ResourceId mask_resource_id,
49               const gfx::RectF& mask_uv_rect,
50               const gfx::Size& mask_texture_size,
51               const gfx::Vector2dF& filters_scale,
52               const gfx::PointF& filters_origin,
53               const gfx::RectF& tex_coord_rect,
54               bool force_anti_aliasing_off,
55               float backdrop_filter_quality,
56               bool can_use_backdrop_filter_cache);
57 
58   AggregatedRenderPassId render_pass_id;
59 
60   static const AggregatedRenderPassDrawQuad* MaterialCast(const DrawQuad*);
61 
62  private:
63   void ExtendValue(base::trace_event::TracedValue* value) const override;
64 };
65 
66 }  // namespace viz
67 
68 #endif  // COMPONENTS_VIZ_COMMON_QUADS_AGGREGATED_RENDER_PASS_DRAW_QUAD_H_
69