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

Side by Side Diff: cc/render_pass_draw_quad.h

Issue 11618026: Move filters to RenderPassDrawQuad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/render_pass.cc ('k') | cc/render_pass_draw_quad.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_RENDER_PASS_DRAW_QUAD_H_ 5 #ifndef CC_RENDER_PASS_DRAW_QUAD_H_
6 #define CC_RENDER_PASS_DRAW_QUAD_H_ 6 #define CC_RENDER_PASS_DRAW_QUAD_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/cc_export.h" 10 #include "cc/cc_export.h"
11 #include "cc/draw_quad.h" 11 #include "cc/draw_quad.h"
12 #include "cc/render_pass.h" 12 #include "cc/render_pass.h"
13 #include "cc/resource_provider.h" 13 #include "cc/resource_provider.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 class CC_EXPORT RenderPassDrawQuad : public DrawQuad { 18 class CC_EXPORT RenderPassDrawQuad : public DrawQuad {
18 public: 19 public:
19 static scoped_ptr<RenderPassDrawQuad> Create(); 20 static scoped_ptr<RenderPassDrawQuad> Create();
21 virtual ~RenderPassDrawQuad();
20 22
21 void SetNew(const SharedQuadState* shared_quad_state, 23 void SetNew(const SharedQuadState* shared_quad_state,
22 gfx::Rect rect, 24 gfx::Rect rect,
23 RenderPass::Id render_pass_id, 25 RenderPass::Id render_pass_id,
24 bool is_replica, 26 bool is_replica,
25 ResourceProvider::ResourceId mask_resource_id, 27 ResourceProvider::ResourceId mask_resource_id,
26 gfx::Rect contents_changed_since_last_frame, 28 gfx::Rect contents_changed_since_last_frame,
27 gfx::RectF mask_uv_rect); 29 gfx::RectF mask_uv_rect,
30 const WebKit::WebFilterOperations& filters,
31 skia::RefPtr<SkImageFilter> filter,
32 const WebKit::WebFilterOperations& background_filters);
28 33
29 void SetAll(const SharedQuadState* shared_quad_state, 34 void SetAll(const SharedQuadState* shared_quad_state,
30 gfx::Rect rect, 35 gfx::Rect rect,
31 gfx::Rect opaque_rect, 36 gfx::Rect opaque_rect,
32 gfx::Rect visible_rect, 37 gfx::Rect visible_rect,
33 bool needs_blending, 38 bool needs_blending,
34 RenderPass::Id render_pass_id, 39 RenderPass::Id render_pass_id,
35 bool is_replica, 40 bool is_replica,
36 ResourceProvider::ResourceId mask_resource_id, 41 ResourceProvider::ResourceId mask_resource_id,
37 gfx::Rect contents_changed_since_last_frame, 42 gfx::Rect contents_changed_since_last_frame,
38 gfx::RectF mask_uv_rect); 43 gfx::RectF mask_uv_rect,
44 const WebKit::WebFilterOperations& filters,
45 skia::RefPtr<SkImageFilter> filter,
46 const WebKit::WebFilterOperations& background_filters);
39 47
40 scoped_ptr<RenderPassDrawQuad> Copy( 48 scoped_ptr<RenderPassDrawQuad> Copy(
41 const SharedQuadState* copied_shared_quad_state, 49 const SharedQuadState* copied_shared_quad_state,
42 RenderPass::Id copied_render_pass_id) const; 50 RenderPass::Id copied_render_pass_id) const;
43 51
44 RenderPass::Id render_pass_id; 52 RenderPass::Id render_pass_id;
45 bool is_replica; 53 bool is_replica;
46 ResourceProvider::ResourceId mask_resource_id; 54 ResourceProvider::ResourceId mask_resource_id;
47 gfx::Rect contents_changed_since_last_frame; 55 gfx::Rect contents_changed_since_last_frame;
48 gfx::RectF mask_uv_rect; 56 gfx::RectF mask_uv_rect;
49 57
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;
63
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;
67
50 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); 68 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
69
51 private: 70 private:
52 RenderPassDrawQuad(); 71 RenderPassDrawQuad();
53 }; 72 };
54 73
55 } 74 }
56 75
57 #endif // CC_RENDER_PASS_DRAW_QUAD_H_ 76 #endif // CC_RENDER_PASS_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/render_pass.cc ('k') | cc/render_pass_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698