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

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

Issue 1144523003: Rename cc::ResourceProvider::ResourceId to cc::ResourceId and move it to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/software_renderer_unittest.cc ('k') | cc/quads/draw_quad_unittest.cc » ('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 "base/callback.h" 8 #include "base/callback.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/quads/shared_quad_state.h" 10 #include "cc/quads/shared_quad_state.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool IsDebugQuad() const { return material == DEBUG_BORDER; } 89 bool IsDebugQuad() const { return material == DEBUG_BORDER; }
90 90
91 bool ShouldDrawWithBlending() const { 91 bool ShouldDrawWithBlending() const {
92 if (needs_blending || shared_quad_state->opacity < 1.0f) 92 if (needs_blending || shared_quad_state->opacity < 1.0f)
93 return true; 93 return true;
94 if (visible_rect.IsEmpty()) 94 if (visible_rect.IsEmpty())
95 return false; 95 return false;
96 return !opaque_rect.Contains(visible_rect); 96 return !opaque_rect.Contains(visible_rect);
97 } 97 }
98 98
99 typedef ResourceProvider::ResourceId ResourceId;
100 typedef base::Callback<ResourceId(ResourceId)> ResourceIteratorCallback; 99 typedef base::Callback<ResourceId(ResourceId)> ResourceIteratorCallback;
101 virtual void IterateResources(const ResourceIteratorCallback& callback) = 0; 100 virtual void IterateResources(const ResourceIteratorCallback& callback) = 0;
102 101
103 // Is the left edge of this tile aligned with the originating layer's 102 // Is the left edge of this tile aligned with the originating layer's
104 // left edge? 103 // left edge?
105 bool IsLeftEdge() const { return !rect.x(); } 104 bool IsLeftEdge() const { return !rect.x(); }
106 105
107 // Is the top edge of this tile aligned with the originating layer's 106 // Is the top edge of this tile aligned with the originating layer's
108 // top edge? 107 // top edge?
109 bool IsTopEdge() const { return !rect.y(); } 108 bool IsTopEdge() const { return !rect.y(); }
(...skipping 26 matching lines...) Expand all
136 const gfx::Rect& rect, 135 const gfx::Rect& rect,
137 const gfx::Rect& opaque_rect, 136 const gfx::Rect& opaque_rect,
138 const gfx::Rect& visible_rect, 137 const gfx::Rect& visible_rect,
139 bool needs_blending); 138 bool needs_blending);
140 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0; 139 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0;
141 }; 140 };
142 141
143 } // namespace cc 142 } // namespace cc
144 143
145 #endif // CC_QUADS_DRAW_QUAD_H_ 144 #endif // CC_QUADS_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/quads/draw_quad_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698