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

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

Issue 2769573002: Return overlay resources to renderers in larger batches. (Closed)
Patch Set: make friend Created 3 years, 9 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/output/gl_renderer.cc ('k') | cc/resources/resource_provider.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 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 struct CC_EXPORT Resources { 115 struct CC_EXPORT Resources {
116 enum : size_t { kMaxResourceIdCount = 4 }; 116 enum : size_t { kMaxResourceIdCount = 4 };
117 Resources(); 117 Resources();
118 118
119 ResourceId* begin() { return ids; } 119 ResourceId* begin() { return ids; }
120 ResourceId* end() { 120 ResourceId* end() {
121 DCHECK_LE(count, kMaxResourceIdCount); 121 DCHECK_LE(count, kMaxResourceIdCount);
122 return ids + count; 122 return ids + count;
123 } 123 }
124 124
125 const ResourceId* const_begin() const { return ids; } 125 const ResourceId* begin() const { return ids; }
126 const ResourceId* const_end() const { 126 const ResourceId* end() const {
127 DCHECK_LE(count, kMaxResourceIdCount); 127 DCHECK_LE(count, kMaxResourceIdCount);
128 return ids + count; 128 return ids + count;
129 } 129 }
130 130
131 uint32_t count; 131 uint32_t count;
132 ResourceId ids[kMaxResourceIdCount]; 132 ResourceId ids[kMaxResourceIdCount];
133 }; 133 };
134 134
135 Resources resources; 135 Resources resources;
136 136
137 protected: 137 protected:
138 DrawQuad(); 138 DrawQuad();
139 139
140 void SetAll(const SharedQuadState* shared_quad_state, 140 void SetAll(const SharedQuadState* shared_quad_state,
141 Material material, 141 Material material,
142 const gfx::Rect& rect, 142 const gfx::Rect& rect,
143 const gfx::Rect& opaque_rect, 143 const gfx::Rect& opaque_rect,
144 const gfx::Rect& visible_rect, 144 const gfx::Rect& visible_rect,
145 bool needs_blending); 145 bool needs_blending);
146 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0; 146 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0;
147 }; 147 };
148 148
149 } // namespace cc 149 } // namespace cc
150 150
151 #endif // CC_QUADS_DRAW_QUAD_H_ 151 #endif // CC_QUADS_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698