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

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

Issue 1396613006: Remove skia::PlatformBitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | skia/ext/bitmap_platform_device_cairo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4f3fb0a325b84da1505857a55f6b7f87319ad9b5..705df7071e2ddb4e2f97b2ca523b20568024ad81 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
@@ -273,15 +273,13 @@ class CaptureTestRenderViewHost : public TestRenderViewHost {
gfx::Size size = controller_->GetCopyResultSize();
SkColor color = controller_->GetSolidColor();
- // Although it's not necessary, use a PlatformBitmap here (instead of a
- // regular SkBitmap) to exercise possible threading issues.
- skia::PlatformBitmap output;
- EXPECT_TRUE(output.Allocate(size.width(), size.height(), false));
+ SkBitmap output;
+ EXPECT_TRUE(output.tryAllocN32Pixels(size.width(), size.height()));
{
- SkAutoLockPixels locker(output.GetBitmap());
- output.GetBitmap().eraseColor(color);
+ SkAutoLockPixels locker(output);
+ output.eraseColor(color);
}
- callback.Run(output.GetBitmap(), content::READBACK_SUCCESS);
+ callback.Run(output, content::READBACK_SUCCESS);
controller_->SignalCopy();
}
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_cairo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698