diff options
| author | 2017-06-29 02:21:44 +0000 | |
|---|---|---|
| committer | 2017-06-29 02:21:44 +0000 | |
| commit | 89e31ac27496f997ae7d4325daff59c213a97879 (patch) | |
| tree | 7509a1321ce6ac961bfd3f52f85b5e6bb780d2eb /libs/hwui/GlopBuilder.cpp | |
| parent | 1261a5cb9913257bf1054de0af7cd17a5e932cc3 (diff) | |
| parent | 14fe0b69c7b0a54742a9901fd2ec9eb4e31569e1 (diff) | |
Merge "Selectively disable filtering if estimated safe" into oc-dev am: 38c97237e3
am: 14fe0b69c7
Change-Id: I9e75af1654188288d57653c754df56855eed5564
Diffstat (limited to 'libs/hwui/GlopBuilder.cpp')
| -rw-r--r-- | libs/hwui/GlopBuilder.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp index 2e9a6e895d8a..c19c1a11e3e2 100644 --- a/libs/hwui/GlopBuilder.cpp +++ b/libs/hwui/GlopBuilder.cpp @@ -457,11 +457,13 @@ GlopBuilder& GlopBuilder::setFillTextureLayer(GlLayer& layer, float alpha) { return *this; } -GlopBuilder& GlopBuilder::setFillExternalTexture(Texture& texture, Matrix4& textureTransform) { +GlopBuilder& GlopBuilder::setFillExternalTexture(Texture& texture, Matrix4& textureTransform, + bool requiresFilter) { TRIGGER_STAGE(kFillStage); REQUIRE_STAGES(kMeshStage | kRoundRectClipStage); - mOutGlop->fill.texture = { &texture, GL_LINEAR, GL_CLAMP_TO_EDGE, &textureTransform }; + GLenum filter = requiresFilter ? GL_LINEAR : GL_NEAREST; + mOutGlop->fill.texture = { &texture, filter, GL_CLAMP_TO_EDGE, &textureTransform }; setFill(SK_ColorWHITE, 1.0f, SkBlendMode::kSrc, Blend::ModeOrderSwap::NoSwap, nullptr, nullptr); |