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

Unified Diff: content/browser/compositor/gl_helper.cc

Issue 1690013002: Remove --tab-capture-upscale/downscale-quality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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
« no previous file with comments | « content/browser/compositor/gl_helper.h ('k') | content/browser/compositor/gl_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gl_helper.cc
diff --git a/content/browser/compositor/gl_helper.cc b/content/browser/compositor/gl_helper.cc
index 55493e900689ba6bcf421056e29fefb1645ab875..2b89dfeead033dd86f7afdae045c70bf037bf6a5 100644
--- a/content/browser/compositor/gl_helper.cc
+++ b/content/browser/compositor/gl_helper.cc
@@ -182,7 +182,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,
@@ -1181,7 +1180,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,
@@ -1201,6 +1199,20 @@ ReadbackYUVInterface* GLHelper::CopyTextureToImpl::CreateReadbackPipelineYUV(
if (supported == GLHelperReadbackSupport::SWIZZLE)
swizzle = kSwizzleBGRA;
+ // "The YUV readback pipeline is used by real-time video capture of
+ // tabs/windows/desktops. Therefore, the scaler chosen here is based on
+ // performance measurements of full end-to-end systems. When down-scaling,
+ // always use the "fast" scaler because it performs well on both low- and
+ // high- end machines, provides decent image quality, and doesn't overwhelm
+ // downstream video encoders with too much entropy (which can drastically
+ // increase CPU utilization). When up-scaling, always use "best" because the
+ // quality improvement is huge with insignificant performance penalty. Note
+ // that this strategy differs from single-frame snapshot capture (i.e., using
+ // the Skia/RGB code path).
+ GLHelper::ScalerQuality quality = ((src_size.width() < dst_size.width()) &&
+ (src_size.height() < dst_size.height()))
+ ? GLHelper::SCALER_QUALITY_BEST
+ : GLHelper::SCALER_QUALITY_FAST;
piman 2016/04/06 18:32:47 If SCALER_QUALITY_GOOD is not used any more, can y
xjz 2016/04/06 18:44:05 SCALER_QUALITY_GOOD is used as the default scaler
piman 2016/04/06 19:20:07 If that the case, then can you leave the policy de
xjz 2016/04/06 23:03:38 Done.
if (max_draw_buffers_ >= 2 && use_mrt) {
return new ReadbackYUV_MRT(gl_, this, helper_->scaler_impl_.get(), quality,
src_size, src_subrect, dst_size, flip_vertically,
@@ -1212,7 +1224,6 @@ ReadbackYUVInterface* GLHelper::CopyTextureToImpl::CreateReadbackPipelineYUV(
}
ReadbackYUVInterface* GLHelper::CreateReadbackPipelineYUV(
- ScalerQuality quality,
const gfx::Size& src_size,
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
@@ -1220,7 +1231,7 @@ ReadbackYUVInterface* GLHelper::CreateReadbackPipelineYUV(
bool use_mrt) {
InitCopyTextToImpl();
return copy_texture_to_impl_->CreateReadbackPipelineYUV(
- quality, src_size, src_subrect, dst_size, flip_vertically, use_mrt);
+ src_size, src_subrect, dst_size, flip_vertically, use_mrt);
}
} // namespace content
« no previous file with comments | « content/browser/compositor/gl_helper.h ('k') | content/browser/compositor/gl_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698