Verified Commit 6177c763 authored by Lee Salzman's avatar Lee Salzman Committed by ma1
Browse files

Bug 2047719. a=dmeehan DONTBUILD

parent 40f8f3ee
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -892,10 +892,11 @@ static void prepare_texture(Texture& t, const IntRect* skip = nullptr);

template <typename S>
static inline void init_filter(S* s, Texture& t) {
  // If the width is not at least 2 pixels, then we can't safely sample the end
  // of the row with a linear filter. In that case, just punt to using nearest
  // filtering instead.
  s->filter = t.width >= 2 ? gl_filter_to_texture_filter(t.mag_filter)
  // If the width is not at least 2 pixel blocks, then we can't safely sample
  // the end of the row with a linear filter. In that case, just punt to using
  // nearest filtering instead.
  int filterWidth = t.internal_format == GL_RGB_RAW_422_APPLE ? 4 : 2;
  s->filter = t.width >= filterWidth ? gl_filter_to_texture_filter(t.mag_filter)
                                     : TextureFilter::NEAREST;
}