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

Unified Diff: cc/layers/video_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/video_layer_impl.cc
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index 8251a0948778931489e7b491801aa9edf7ddb862..c2b5afb61518be4505738feb5869510b61ab3e02 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -205,6 +205,7 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
gfx::PointF uv_bottom_right(tex_width_scale, tex_height_scale);
float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
bool flipped = false;
+ bool nearest_neighbor = false;
TextureDrawQuad* texture_quad =
render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
texture_quad->SetNew(shared_quad_state,
@@ -217,7 +218,8 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
uv_bottom_right,
SK_ColorTRANSPARENT,
opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
break;
}
case VideoFrameExternalResources::YUV_RESOURCE: {
@@ -254,6 +256,7 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
gfx::PointF uv_bottom_right(tex_width_scale, tex_height_scale);
float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
bool flipped = false;
+ bool nearest_neighbor = false;
TextureDrawQuad* texture_quad =
render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
texture_quad->SetNew(shared_quad_state,
@@ -266,7 +269,8 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
uv_bottom_right,
SK_ColorTRANSPARENT,
opacity,
- flipped);
+ flipped,
+ nearest_neighbor);
break;
}
case VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE: {

Powered by Google App Engine
This is Rietveld 408576698