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

Unified Diff: content/common/gpu/client/gl_helper.cc

Issue 1690013002: Remove --tab-capture-upscale/downscale-quality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: content/common/gpu/client/gl_helper.cc
diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc
index 5549caaacb88bd8650c4d2dc84d6cf87ffcacdb0..ca3e9a3c11647379b3557fe5205c9c0e36ab4e7b 100644
--- a/content/common/gpu/client/gl_helper.cc
+++ b/content/common/gpu/client/gl_helper.cc
@@ -189,7 +189,6 @@ class GLHelper::CopyTextureToImpl
GLHelper::ScalerQuality quality);
ReadbackYUVInterface* CreateReadbackPipelineYUV(
- GLHelper::ScalerQuality quality,
const gfx::Size& src_size,
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
@@ -1330,7 +1329,6 @@ bool GLHelper::IsReadbackConfigSupported(SkColorType color_type) {
}
ReadbackYUVInterface* GLHelper::CopyTextureToImpl::CreateReadbackPipelineYUV(
- GLHelper::ScalerQuality quality,
const gfx::Size& src_size,
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
@@ -1350,6 +1348,10 @@ ReadbackYUVInterface* GLHelper::CopyTextureToImpl::CreateReadbackPipelineYUV(
if (supported == GLHelperReadbackSupport::SWIZZLE)
swizzle = kSwizzleBGRA;
+ GLHelper::ScalerQuality quality = ((src_size.width() < dst_size.width()) &&
+ (src_size.height() < dst_size.height()))
+ ? GLHelper::SCALER_QUALITY_BEST
+ : GLHelper::SCALER_QUALITY_FAST;
if (max_draw_buffers_ >= 2 && use_mrt) {
return new ReadbackYUV_MRT(gl_,
this,
@@ -1373,19 +1375,14 @@ ReadbackYUVInterface* GLHelper::CopyTextureToImpl::CreateReadbackPipelineYUV(
}
ReadbackYUVInterface* GLHelper::CreateReadbackPipelineYUV(
- ScalerQuality quality,
const gfx::Size& src_size,
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
bool flip_vertically,
bool use_mrt) {
InitCopyTextToImpl();
- return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality,
- src_size,
- src_subrect,
- dst_size,
- flip_vertically,
- use_mrt);
+ return copy_texture_to_impl_->CreateReadbackPipelineYUV(
+ src_size, src_subrect, dst_size, flip_vertically, use_mrt);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698