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

Unified Diff: cc/tile_draw_quad.cc

Issue 11649005: cc: Support anti-aliasing for solid color layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add DrawQuad::AntiAliasing struct. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: cc/tile_draw_quad.cc
diff --git a/cc/tile_draw_quad.cc b/cc/tile_draw_quad.cc
index 965bb0361eadabc66844c89dd7d730d78b00c91c..83c9e8a64e3599f0f7dfb298ce8dc294eaac5992 100644
--- a/cc/tile_draw_quad.cc
+++ b/cc/tile_draw_quad.cc
@@ -11,11 +11,7 @@ namespace cc {
TileDrawQuad::TileDrawQuad()
: resource_id(0),
- swizzle_contents(false),
- left_edge_aa(false),
- top_edge_aa(false),
- right_edge_aa(false),
- bottom_edge_aa(false) {
+ swizzle_contents(false) {
}
scoped_ptr<TileDrawQuad> TileDrawQuad::Create() {
@@ -25,26 +21,19 @@ scoped_ptr<TileDrawQuad> TileDrawQuad::Create() {
void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
gfx::Rect rect,
gfx::Rect opaque_rect,
+ AntiAliasing anti_aliasing,
unsigned resource_id,
const gfx::RectF& tex_coord_rect,
gfx::Size texture_size,
- bool swizzle_contents,
- bool left_edge_aa,
- bool top_edge_aa,
- bool right_edge_aa,
- bool bottom_edge_aa) {
+ bool swizzle_contents) {
gfx::Rect visible_rect = rect;
bool needs_blending = false;
DrawQuad::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect,
- opaque_rect, visible_rect, needs_blending);
+ opaque_rect, visible_rect, needs_blending, anti_aliasing);
this->resource_id = resource_id;
this->tex_coord_rect = tex_coord_rect;
this->texture_size = texture_size;
this->swizzle_contents = swizzle_contents;
- this->left_edge_aa = left_edge_aa;
- this->top_edge_aa = top_edge_aa;
- this->right_edge_aa = right_edge_aa;
- this->bottom_edge_aa = bottom_edge_aa;
// Override needs_blending after initializing the quad.
this->needs_blending = IsAntialiased();
@@ -55,24 +44,17 @@ void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
gfx::Rect opaque_rect,
gfx::Rect visible_rect,
bool needs_blending,
+ AntiAliasing anti_aliasing,
unsigned resource_id,
const gfx::RectF& tex_coord_rect,
gfx::Size texture_size,
- bool swizzle_contents,
- bool left_edge_aa,
- bool top_edge_aa,
- bool right_edge_aa,
- bool bottom_edge_aa) {
+ bool swizzle_contents) {
DrawQuad::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect,
- opaque_rect, visible_rect, needs_blending);
+ opaque_rect, visible_rect, needs_blending, anti_aliasing);
this->resource_id = resource_id;
this->tex_coord_rect = tex_coord_rect;
this->texture_size = texture_size;
this->swizzle_contents = swizzle_contents;
- this->left_edge_aa = left_edge_aa;
- this->top_edge_aa = top_edge_aa;
- this->right_edge_aa = right_edge_aa;
- this->bottom_edge_aa = bottom_edge_aa;
}
const TileDrawQuad* TileDrawQuad::MaterialCast(

Powered by Google App Engine
This is Rietveld 408576698