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

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

Issue 593503003: Support error handling for Surface readbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted code and fixed build issue in test. Created 6 years, 1 month 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/browser/media/capture/web_contents_video_capture_device_unittest.cc
diff --git a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
index 09f84454f601c8acfe1fee92c1e31122a31b6858..3e506fecaa74d7ab08d1025360550a1d8f6affe4 100644
--- a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
@@ -246,11 +246,10 @@ class CaptureTestRenderViewHost : public TestRenderViewHost {
}
// TestRenderViewHost overrides.
- void CopyFromBackingStore(
- const gfx::Rect& src_rect,
- const gfx::Size& accelerated_dst_size,
- const base::Callback<void(bool, const SkBitmap&)>& callback,
- const SkColorType color_type) override {
+ void CopyFromBackingStore(const gfx::Rect& src_rect,
+ const gfx::Size& accelerated_dst_size,
+ ReadbackRequestCallback& callback,
+ const SkColorType color_type) override {
gfx::Size size = controller_->GetCopyResultSize();
SkColor color = controller_->GetSolidColor();
@@ -262,7 +261,7 @@ class CaptureTestRenderViewHost : public TestRenderViewHost {
SkAutoLockPixels locker(output.GetBitmap());
output.GetBitmap().eraseColor(color);
}
- callback.Run(true, output.GetBitmap());
+ callback.Run(output.GetBitmap(), content::READBACK_SUCCESS);
controller_->SignalCopy();
}

Powered by Google App Engine
This is Rietveld 408576698