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

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

Issue 1152473006: cc: Remove DrawQuad::IterateResoruces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mkwst review Created 5 years, 6 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 27 matching lines...) Expand all
38 bool needs_blending, 38 bool needs_blending,
39 RenderPassId render_pass_id, 39 RenderPassId render_pass_id,
40 ResourceId mask_resource_id, 40 ResourceId mask_resource_id,
41 const gfx::Vector2dF& mask_uv_scale, 41 const gfx::Vector2dF& mask_uv_scale,
42 const gfx::Size& mask_texture_size, 42 const gfx::Size& mask_texture_size,
43 const FilterOperations& filters, 43 const FilterOperations& filters,
44 const gfx::Vector2dF& filters_scale, 44 const gfx::Vector2dF& filters_scale,
45 const FilterOperations& background_filters); 45 const FilterOperations& background_filters);
46 46
47 RenderPassId render_pass_id; 47 RenderPassId render_pass_id;
48 ResourceId mask_resource_id;
49 gfx::Vector2dF mask_uv_scale; 48 gfx::Vector2dF mask_uv_scale;
50 gfx::Size mask_texture_size; 49 gfx::Size mask_texture_size;
51 50
52 // Post-processing filters, applied to the pixels in the render pass' texture. 51 // Post-processing filters, applied to the pixels in the render pass' texture.
53 FilterOperations filters; 52 FilterOperations filters;
54 53
55 // The scale from layer space of the root layer of the render pass to 54 // The scale from layer space of the root layer of the render pass to
56 // the render pass physical pixels. This scale is applied to the filter 55 // the render pass physical pixels. This scale is applied to the filter
57 // parameters for pixel-moving filters. This scale should include 56 // parameters for pixel-moving filters. This scale should include
58 // content-to-target-space scale, and device pixel ratio. 57 // content-to-target-space scale, and device pixel ratio.
59 gfx::Vector2dF filters_scale; 58 gfx::Vector2dF filters_scale;
60 59
61 // Post-processing filters, applied to the pixels showing through the 60 // Post-processing filters, applied to the pixels showing through the
62 // background of the render pass, from behind it. 61 // background of the render pass, from behind it.
63 FilterOperations background_filters; 62 FilterOperations background_filters;
64 63
65 // Helper function to generate the normalized uv rect. 64 // Helper function to generate the normalized uv rect.
66 gfx::RectF MaskUVRect() const; 65 gfx::RectF MaskUVRect() const;
67 66
68 void IterateResources(const ResourceIteratorCallback& callback) override; 67 ResourceId mask_resource_id() const {
68 return resources.ids[kMaskResourceIdIndex];
69 }
69 70
70 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); 71 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
71 72
72 private: 73 private:
74 static const size_t kMaskResourceIdIndex = 0;
75
73 void ExtendValue(base::trace_event::TracedValue* value) const override; 76 void ExtendValue(base::trace_event::TracedValue* value) const override;
74 }; 77 };
75 78
76 } // namespace cc 79 } // namespace cc
77 80
78 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ 81 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698