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

Unified Diff: cc/output/gl_renderer.cc

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/output/delegating_renderer_unittest.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 13cda6ee9ad5d6481dc9116d0c628381fc04537e..7896bb88d56441a5b56a746af14afa89d731361d 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -154,8 +154,6 @@ class GLRenderer::ScopedUseGrContext {
public:
static scoped_ptr<ScopedUseGrContext> Create(GLRenderer* renderer,
DrawingFrame* frame) {
- if (!renderer->output_surface_->context_provider()->GrContext())
- return nullptr;
return make_scoped_ptr(new ScopedUseGrContext(renderer, frame));
}
@@ -1627,7 +1625,8 @@ void GLRenderer::DrawContentQuadAA(const DrawingFrame* frame,
SetupQuadForAntialiasing(device_transform, quad, &local_quad, edge);
ResourceProvider::ScopedSamplerGL quad_resource_lock(
- resource_provider_, resource_id, GL_LINEAR);
+ resource_provider_, resource_id,
+ quad->nearest_neighbor ? GL_NEAREST : GL_LINEAR);
SamplerType sampler =
SamplerTypeFromTextureTarget(quad_resource_lock.target());
@@ -1711,7 +1710,8 @@ void GLRenderer::DrawContentQuadNoAA(const DrawingFrame* frame,
bool scaled = (tex_to_geom_scale_x != 1.f || tex_to_geom_scale_y != 1.f);
GLenum filter =
- (scaled || !quad->quadTransform().IsIdentityOrIntegerTranslation())
+ (scaled || !quad->quadTransform().IsIdentityOrIntegerTranslation()) &&
+ !quad->nearest_neighbor
? GL_LINEAR
: GL_NEAREST;
« no previous file with comments | « cc/output/delegating_renderer_unittest.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698