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

Unified Diff: cc/layers/texture_layer.h

Issue 558083002: [cc] Add nearest neighbor filtering for TextureLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase Created 6 years 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/layers/painted_scrollbar_layer_impl.cc ('k') | cc/layers/texture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer.h
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h
index fa52a8c11ff20b5df8d84c71fc283354910a46a6..15c9aa0622515092aedf296dc8975178a30d9ae4 100644
--- a/cc/layers/texture_layer.h
+++ b/cc/layers/texture_layer.h
@@ -100,6 +100,10 @@ class CC_EXPORT TextureLayer : public Layer {
// true.
void SetFlipped(bool flipped);
+ // Sets whether this texture should use nearest neighbor interpolation as
+ // opposed to bilinear. Defaults to false.
+ void SetNearestNeighbor(bool nearest_neighbor);
+
// Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1).
void SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right);
@@ -156,6 +160,7 @@ class CC_EXPORT TextureLayer : public Layer {
TextureLayerClient* client_;
bool flipped_;
+ bool nearest_neighbor_;
gfx::PointF uv_top_left_;
gfx::PointF uv_bottom_right_;
// [bottom left, top left, top right, bottom right]
« no previous file with comments | « cc/layers/painted_scrollbar_layer_impl.cc ('k') | cc/layers/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698