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

Unified Diff: cc/tile_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/tile_draw_quad.h ('k') | cc/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_draw_quad.cc
diff --git a/cc/tile_draw_quad.cc b/cc/tile_draw_quad.cc
index e5c3e4020dcffe88e4e971069e41e2f66f7a7cf5..fa8b9e11484367adfd24c5cdabe3f97ee6a34974 100644
--- a/cc/tile_draw_quad.cc
+++ b/cc/tile_draw_quad.cc
@@ -15,8 +15,7 @@ scoped_ptr<TileDrawQuad> TileDrawQuad::create(const SharedQuadState* sharedQuadS
}
TileDrawQuad::TileDrawQuad(const SharedQuadState* sharedQuadState, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, unsigned resourceId, const gfx::Vector2d& textureOffset, const gfx::Size& textureSize, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA)
- : DrawQuad(sharedQuadState, DrawQuad::TILED_CONTENT, quadRect, opaqueRect)
- , m_resourceId(resourceId)
+ : m_resourceId(resourceId)
, m_textureOffset(textureOffset)
, m_textureSize(textureSize)
, m_swizzleContents(swizzleContents)
@@ -25,13 +24,14 @@ TileDrawQuad::TileDrawQuad(const SharedQuadState* sharedQuadState, const gfx::Re
, m_rightEdgeAA(rightEdgeAA)
, m_bottomEdgeAA(bottomEdgeAA)
{
- if (isAntialiased())
- needs_blending_ = true;
+ gfx::Rect visibleRect = quadRect;
+ bool needsBlending = isAntialiased();
+ DrawQuad::SetAll(sharedQuadState, DrawQuad::TILED_CONTENT, quadRect, opaqueRect, visibleRect, needsBlending);
}
const TileDrawQuad* TileDrawQuad::materialCast(const DrawQuad* quad)
{
- DCHECK(quad->material() == DrawQuad::TILED_CONTENT);
+ DCHECK(quad->material == DrawQuad::TILED_CONTENT);
return static_cast<const TileDrawQuad*>(quad);
}
« no previous file with comments | « cc/tile_draw_quad.h ('k') | cc/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698