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

Unified Diff: cc/resources/resource_provider.cc

Issue 558083002: [cc] Add nearest neighbor filtering for TextureLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove printfs, clean up CL. Created 6 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
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 9651ef7939f0e33347b1976d89c308492df08858..d6c9ee7b63f4ab4e9a82d1d32e1354e9b97bc5ab 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -596,7 +596,7 @@ ResourceProvider::ResourceId ResourceProvider::CreateResourceFromTextureMailbox(
gfx::Size(),
Resource::External,
mailbox.target(),
- GL_LINEAR,
+ mailbox.nearest_neighbor() ? GL_NEAREST : GL_LINEAR,
danakj 2014/11/04 21:30:23 can you add a test to resource_provider_unittest.c
jackhou1 2014/11/12 03:35:17 I added a bit to ResourceProviderTest.TextureMailb
piman 2014/11/12 04:43:26 That's a user error then.
0,
GL_CLAMP_TO_EDGE,
TextureHintImmutable,
@@ -616,7 +616,7 @@ ResourceProvider::ResourceId ResourceProvider::CreateResourceFromTextureMailbox(
shared_bitmap.release(),
mailbox.shared_memory_size(),
Resource::External,
- GL_LINEAR,
+ mailbox.nearest_neighbor() ? GL_NEAREST : GL_LINEAR,
GL_CLAMP_TO_EDGE);
}
resource.allocated = true;
@@ -1335,7 +1335,7 @@ void ResourceProvider::ReceiveFromChild(
resource = Resource(it->mailbox_holder.mailbox,
it->size,
Resource::Delegated,
- GL_LINEAR,
+ it->filter,
danakj 2014/11/04 21:30:23 can you add a test to resource_provider_unittest.c
jackhou1 2014/11/12 03:35:17 Huh, looks like Resource::filter is never read for
piman 2014/11/12 04:43:26 --disable-gpu
jackhou1 2014/11/12 05:05:53 Looks like Patch Set 9 works fine with --disable-g
it->is_repeated ? GL_REPEAT : GL_CLAMP_TO_EDGE);
} else {
resource = Resource(0,

Powered by Google App Engine
This is Rietveld 408576698