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

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

Issue 1678623002: Switch cc::RenderPassId and cc::DrawQuad::Resources to use uint32_t instead of size_t. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 10 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 | « no previous file | cc/quads/render_pass_id.h » ('j') | content/common/cc_messages.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_DRAW_QUAD_H_ 5 #ifndef CC_QUADS_DRAW_QUAD_H_
6 #define CC_QUADS_DRAW_QUAD_H_ 6 #define CC_QUADS_DRAW_QUAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 struct CC_EXPORT Resources { 117 struct CC_EXPORT Resources {
118 enum : size_t { kMaxResourceIdCount = 4 }; 118 enum : size_t { kMaxResourceIdCount = 4 };
119 Resources(); 119 Resources();
120 120
121 ResourceId* begin() { return ids; } 121 ResourceId* begin() { return ids; }
122 ResourceId* end() { 122 ResourceId* end() {
123 DCHECK_LE(count, kMaxResourceIdCount); 123 DCHECK_LE(count, kMaxResourceIdCount);
124 return ids + count; 124 return ids + count;
125 } 125 }
126 126
127 size_t count; 127 uint32_t count;
128 ResourceId ids[kMaxResourceIdCount]; 128 ResourceId ids[kMaxResourceIdCount];
129 }; 129 };
130 130
131 Resources resources; 131 Resources resources;
132 132
133 protected: 133 protected:
134 DrawQuad(); 134 DrawQuad();
135 135
136 void SetAll(const SharedQuadState* shared_quad_state, 136 void SetAll(const SharedQuadState* shared_quad_state,
137 Material material, 137 Material material,
138 const gfx::Rect& rect, 138 const gfx::Rect& rect,
139 const gfx::Rect& opaque_rect, 139 const gfx::Rect& opaque_rect,
140 const gfx::Rect& visible_rect, 140 const gfx::Rect& visible_rect,
141 bool needs_blending); 141 bool needs_blending);
142 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0; 142 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0;
143 }; 143 };
144 144
145 } // namespace cc 145 } // namespace cc
146 146
147 #endif // CC_QUADS_DRAW_QUAD_H_ 147 #endif // CC_QUADS_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « no previous file | cc/quads/render_pass_id.h » ('j') | content/common/cc_messages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698