Revert 203708 "Disable ico_image_decoder_unittest until the bad ..."
[chromium-blink-merge.git] / cc / quads / render_pass_draw_quad.h
blob6d67917e89bd8d00962401993848ab84d49aa0b0
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.
5 #ifndef CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
6 #define CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h"
11 #include "cc/quads/draw_quad.h"
12 #include "cc/quads/render_pass.h"
13 #include "cc/resources/resource_provider.h"
14 #include "third_party/WebKit/public/platform/WebFilterOperations.h"
16 namespace cc {
18 class CC_EXPORT RenderPassDrawQuad : public DrawQuad {
19 public:
20 static scoped_ptr<RenderPassDrawQuad> Create();
21 virtual ~RenderPassDrawQuad();
23 void SetNew(const SharedQuadState* shared_quad_state,
24 gfx::Rect rect,
25 RenderPass::Id render_pass_id,
26 bool is_replica,
27 ResourceProvider::ResourceId mask_resource_id,
28 gfx::Rect contents_changed_since_last_frame,
29 gfx::RectF mask_uv_rect,
30 const WebKit::WebFilterOperations& filters,
31 skia::RefPtr<SkImageFilter> filter,
32 const WebKit::WebFilterOperations& background_filters);
34 void SetAll(const SharedQuadState* shared_quad_state,
35 gfx::Rect rect,
36 gfx::Rect opaque_rect,
37 gfx::Rect visible_rect,
38 bool needs_blending,
39 RenderPass::Id render_pass_id,
40 bool is_replica,
41 ResourceProvider::ResourceId mask_resource_id,
42 gfx::Rect contents_changed_since_last_frame,
43 gfx::RectF mask_uv_rect,
44 const WebKit::WebFilterOperations& filters,
45 skia::RefPtr<SkImageFilter> filter,
46 const WebKit::WebFilterOperations& background_filters);
48 scoped_ptr<RenderPassDrawQuad> Copy(
49 const SharedQuadState* copied_shared_quad_state,
50 RenderPass::Id copied_render_pass_id) const;
52 RenderPass::Id render_pass_id;
53 bool is_replica;
54 ResourceProvider::ResourceId mask_resource_id;
55 gfx::Rect contents_changed_since_last_frame;
56 gfx::RectF mask_uv_rect;
58 // Deprecated post-processing filters, applied to the pixels in the render
59 // pass' texture.
60 WebKit::WebFilterOperations filters;
61 // Post-processing filter applied to the pixels in the render pass' texture.
62 skia::RefPtr<SkImageFilter> filter;
64 // Post-processing filters, applied to the pixels showing through the
65 // background of the render pass, from behind it.
66 WebKit::WebFilterOperations background_filters;
68 virtual void IterateResources(const ResourceIteratorCallback& callback)
69 OVERRIDE;
71 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
73 private:
74 RenderPassDrawQuad();
77 } // namespace cc
79 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_