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

Unified Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 469493002: Chrome OS desktop capture: pad capture size to multiples of 16 pixels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/desktop_capture_device_aura.cc
diff --git a/content/browser/media/capture/desktop_capture_device_aura.cc b/content/browser/media/capture/desktop_capture_device_aura.cc
index c99ad01e2bcf96074448b9fd0d77fb9a6ff42c75..b795b1cb8e39ed8476c2a74b6b3e93da72319d32 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura.cc
@@ -245,8 +245,15 @@ void DesktopVideoCaptureMachine::UpdateCaptureSize() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (oracle_proxy_ && desktop_window_) {
ui::Layer* layer = desktop_window_->layer();
- oracle_proxy_->UpdateCaptureSize(ui::ConvertSizeToPixel(
- layer, layer->bounds().size()));
+ gfx::Size capture_size =
+ ui::ConvertSizeToPixel(layer, layer->bounds().size());
+#if defined(OS_CHROMEOS)
+ // Pad desktop capture size to multiples of 16 pixels to accommodate HW
+ // encoder. TODO(hshi): remove this hack. See http://crbug.com/402151
+ capture_size.SetSize((capture_size.width() + 15) & ~15,
+ (capture_size.height() + 15) & ~15);
+#endif
+ oracle_proxy_->UpdateCaptureSize(capture_size);
}
ClearCursorState();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698