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

Side by Side Diff: cc/quads/render_pass_draw_quad.h

Issue 23455060: mix-blend-mode implementation for accelerated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months 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
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_QUADS_RENDER_PASS_DRAW_QUAD_H_ 5 #ifndef CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
6 #define CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ 6 #define CC_QUADS_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/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void SetNew(const SharedQuadState* shared_quad_state, 23 void SetNew(const SharedQuadState* shared_quad_state,
24 gfx::Rect rect, 24 gfx::Rect rect,
25 RenderPass::Id render_pass_id, 25 RenderPass::Id render_pass_id,
26 bool is_replica, 26 bool is_replica,
27 ResourceProvider::ResourceId mask_resource_id, 27 ResourceProvider::ResourceId mask_resource_id,
28 gfx::Rect contents_changed_since_last_frame, 28 gfx::Rect contents_changed_since_last_frame,
29 gfx::RectF mask_uv_rect, 29 gfx::RectF mask_uv_rect,
30 const FilterOperations& filters, 30 const FilterOperations& filters,
31 skia::RefPtr<SkImageFilter> filter, 31 skia::RefPtr<SkImageFilter> filter,
32 const FilterOperations& background_filters); 32 const FilterOperations& background_filters,
33 SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode);
shawnsingh 2013/09/25 05:33:53 would it make more sense to put this in the Shared
rosca 2013/09/25 18:00:00 Done.
33 34
34 void SetAll(const SharedQuadState* shared_quad_state, 35 void SetAll(const SharedQuadState* shared_quad_state,
35 gfx::Rect rect, 36 gfx::Rect rect,
36 gfx::Rect opaque_rect, 37 gfx::Rect opaque_rect,
37 gfx::Rect visible_rect, 38 gfx::Rect visible_rect,
38 bool needs_blending, 39 bool needs_blending,
39 RenderPass::Id render_pass_id, 40 RenderPass::Id render_pass_id,
40 bool is_replica, 41 bool is_replica,
41 ResourceProvider::ResourceId mask_resource_id, 42 ResourceProvider::ResourceId mask_resource_id,
42 gfx::Rect contents_changed_since_last_frame, 43 gfx::Rect contents_changed_since_last_frame,
43 gfx::RectF mask_uv_rect, 44 gfx::RectF mask_uv_rect,
44 const FilterOperations& filters, 45 const FilterOperations& filters,
45 skia::RefPtr<SkImageFilter> filter, 46 skia::RefPtr<SkImageFilter> filter,
46 const FilterOperations& background_filters); 47 const FilterOperations& background_filters,
48 SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode);
47 49
48 scoped_ptr<RenderPassDrawQuad> Copy( 50 scoped_ptr<RenderPassDrawQuad> Copy(
49 const SharedQuadState* copied_shared_quad_state, 51 const SharedQuadState* copied_shared_quad_state,
50 RenderPass::Id copied_render_pass_id) const; 52 RenderPass::Id copied_render_pass_id) const;
51 53
52 RenderPass::Id render_pass_id; 54 RenderPass::Id render_pass_id;
53 bool is_replica; 55 bool is_replica;
54 ResourceProvider::ResourceId mask_resource_id; 56 ResourceProvider::ResourceId mask_resource_id;
55 gfx::Rect contents_changed_since_last_frame; 57 gfx::Rect contents_changed_since_last_frame;
56 gfx::RectF mask_uv_rect; 58 gfx::RectF mask_uv_rect;
57 59
58 // Deprecated post-processing filters, applied to the pixels in the render 60 // Deprecated post-processing filters, applied to the pixels in the render
59 // pass' texture. 61 // pass' texture.
60 FilterOperations filters; 62 FilterOperations filters;
61 // Post-processing filter applied to the pixels in the render pass' texture. 63 // Post-processing filter applied to the pixels in the render pass' texture.
62 skia::RefPtr<SkImageFilter> filter; 64 skia::RefPtr<SkImageFilter> filter;
63 65
64 // Post-processing filters, applied to the pixels showing through the 66 // Post-processing filters, applied to the pixels showing through the
65 // background of the render pass, from behind it. 67 // background of the render pass, from behind it.
66 FilterOperations background_filters; 68 FilterOperations background_filters;
67 69
70 SkXfermode::Mode blend_mode;
71
68 virtual void IterateResources(const ResourceIteratorCallback& callback) 72 virtual void IterateResources(const ResourceIteratorCallback& callback)
69 OVERRIDE; 73 OVERRIDE;
70 74
71 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); 75 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
72 76
73 private: 77 private:
74 RenderPassDrawQuad(); 78 RenderPassDrawQuad();
75 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; 79 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE;
76 }; 80 };
77 81
78 } // namespace cc 82 } // namespace cc
79 83
80 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ 84 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698