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

Unified Diff: cc/debug_border_draw_quad.cc

Issue 11418047: cc: Turn DrawQuad into a struct-like class with public data members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no virtual for SetAll() Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/checkerboard_draw_quad.cc ('k') | cc/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug_border_draw_quad.cc
diff --git a/cc/debug_border_draw_quad.cc b/cc/debug_border_draw_quad.cc
index 6d958185d09552b6a5a0952141c6ac739dba635b..800912844f0973013b0fdf39d4dc3be2cbefb77e 100644
--- a/cc/debug_border_draw_quad.cc
+++ b/cc/debug_border_draw_quad.cc
@@ -14,17 +14,18 @@ scoped_ptr<DebugBorderDrawQuad> DebugBorderDrawQuad::create(const SharedQuadStat
}
DebugBorderDrawQuad::DebugBorderDrawQuad(const SharedQuadState* sharedQuadState, const gfx::Rect& quadRect, SkColor color, int width)
- : DrawQuad(sharedQuadState, DrawQuad::DEBUG_BORDER, quadRect, gfx::Rect())
- , m_color(color)
+ : m_color(color)
, m_width(width)
{
- if (SkColorGetA(m_color) < 255)
- needs_blending_ = true;
+ gfx::Rect opaqueRect;
+ gfx::Rect visibleRect = quadRect;
+ bool needsBlending = SkColorGetA(m_color) < 255;
+ DrawQuad::SetAll(sharedQuadState, DrawQuad::DEBUG_BORDER, quadRect, opaqueRect, visibleRect, needsBlending);
}
const DebugBorderDrawQuad* DebugBorderDrawQuad::materialCast(const DrawQuad* quad)
{
- DCHECK(quad->material() == DrawQuad::DEBUG_BORDER);
+ DCHECK(quad->material == DrawQuad::DEBUG_BORDER);
return static_cast<const DebugBorderDrawQuad*>(quad);
}
« no previous file with comments | « cc/checkerboard_draw_quad.cc ('k') | cc/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698