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

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

Issue 2064833002: Implement DrawQuad StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix move constructor Created 4 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
« no previous file with comments | « cc/quads/render_pass.cc ('k') | cc/quads/texture_draw_quad.h » ('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_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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 #include "cc/output/filter_operations.h" 13 #include "cc/output/filter_operations.h"
14 #include "cc/quads/draw_quad.h" 14 #include "cc/quads/draw_quad.h"
15 #include "cc/quads/render_pass_id.h" 15 #include "cc/quads/render_pass_id.h"
16 #include "cc/resources/resource_provider.h" 16 #include "cc/resources/resource_provider.h"
17 17
18 namespace cc { 18 namespace cc {
19 19
20 class CC_EXPORT RenderPassDrawQuad : public DrawQuad { 20 class CC_EXPORT RenderPassDrawQuad : public DrawQuad {
21 public: 21 public:
22 static const size_t kMaskResourceIdIndex = 0;
23
22 RenderPassDrawQuad(); 24 RenderPassDrawQuad();
23 RenderPassDrawQuad(const RenderPassDrawQuad& other); 25 RenderPassDrawQuad(const RenderPassDrawQuad& other);
24 ~RenderPassDrawQuad() override; 26 ~RenderPassDrawQuad() override;
25 27
26 void SetNew(const SharedQuadState* shared_quad_state, 28 void SetNew(const SharedQuadState* shared_quad_state,
27 const gfx::Rect& rect, 29 const gfx::Rect& rect,
28 const gfx::Rect& visible_rect, 30 const gfx::Rect& visible_rect,
29 RenderPassId render_pass_id, 31 RenderPassId render_pass_id,
30 ResourceId mask_resource_id, 32 ResourceId mask_resource_id,
31 const gfx::Vector2dF& mask_uv_scale, 33 const gfx::Vector2dF& mask_uv_scale,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Helper function to generate the normalized uv rect. 69 // Helper function to generate the normalized uv rect.
68 gfx::RectF MaskUVRect() const; 70 gfx::RectF MaskUVRect() const;
69 71
70 ResourceId mask_resource_id() const { 72 ResourceId mask_resource_id() const {
71 return resources.ids[kMaskResourceIdIndex]; 73 return resources.ids[kMaskResourceIdIndex];
72 } 74 }
73 75
74 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); 76 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
75 77
76 private: 78 private:
77 static const size_t kMaskResourceIdIndex = 0;
78
79 void ExtendValue(base::trace_event::TracedValue* value) const override; 79 void ExtendValue(base::trace_event::TracedValue* value) const override;
80 }; 80 };
81 81
82 } // namespace cc 82 } // namespace cc
83 83
84 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_ 84 #endif // CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/quads/render_pass.cc ('k') | cc/quads/texture_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698