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

Unified Diff: cc/layers/nine_patch_layer_impl.cc

Issue 558083002: [cc] Add nearest neighbor filtering for TextureLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add nearest_neighbor field to TextureMailbox. Created 6 years, 2 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/layers/nine_patch_layer_impl.cc
diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc
index 1c76d110a9f0e6cf92344c5b50a7167fbf59eafe..e01bde3b45eacc112a22c2a6f0b1b9fcf4f0c7fb 100644
--- a/cc/layers/nine_patch_layer_impl.cc
+++ b/cc/layers/nine_patch_layer_impl.cc
@@ -102,6 +102,7 @@ void NinePatchLayerImpl::AppendQuads(
return;
static const bool flipped = false;
+ static const bool nearest_neighbor = false;
static const bool premultiplied_alpha = true;
DCHECK(!bounds().IsEmpty());
@@ -228,7 +229,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_top_left.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
visible_rect =
@@ -246,7 +248,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_top_right.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
visible_rect =
@@ -264,7 +267,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_bottom_left.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
visible_rect =
@@ -282,7 +286,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_bottom_right.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
visible_rect = occlusion_in_content_space.GetUnoccludedContentRect(layer_top);
@@ -299,7 +304,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_top.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
visible_rect =
@@ -317,7 +323,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_left.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
visible_rect =
@@ -335,7 +342,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_right.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
visible_rect =
@@ -353,7 +361,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_bottom.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
if (fill_center_) {
@@ -372,7 +381,8 @@ void NinePatchLayerImpl::AppendQuads(
uv_center.bottom_right(),
SK_ColorTRANSPARENT,
vertex_opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698