summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-21 00:26:07 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-21 00:26:07 +0000
commit1f4bb9e8d93accfc080f62b419ca312d1f48f11e (patch)
tree60fab8f50c47e4f4233ff178de6a4de3fd18047a
parent406e408bcfbcfd041e0c4e882c1085d013f0ac09 (diff)
downloadchromium_src-1f4bb9e8d93accfc080f62b419ca312d1f48f11e.zip
chromium_src-1f4bb9e8d93accfc080f62b419ca312d1f48f11e.tar.gz
chromium_src-1f4bb9e8d93accfc080f62b419ca312d1f48f11e.tar.bz2
Fix and reinstate VideoFrameCapturerTest.Capture
BUG=137878 TEST=VideoFrameCapturerTest.Capture Review URL: https://chromiumcodereview.appspot.com/10816012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147744 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/host/video_frame_capturer_mac.mm7
-rw-r--r--remoting/host/video_frame_capturer_unittest.cc8
2 files changed, 7 insertions, 8 deletions
diff --git a/remoting/host/video_frame_capturer_mac.mm b/remoting/host/video_frame_capturer_mac.mm
index 9adb872..2b8cf5a 100644
--- a/remoting/host/video_frame_capturer_mac.mm
+++ b/remoting/host/video_frame_capturer_mac.mm
@@ -116,7 +116,11 @@ void scoped_pixel_buffer_object::Release() {
// A class representing a full-frame pixel buffer.
class VideoFrameBuffer {
public:
- VideoFrameBuffer() : bytes_per_row_(0), needs_update_(true) { }
+ VideoFrameBuffer() :
+ size_(SkISize::Make(0, 0)),
+ bytes_per_row_(0),
+ needs_update_(true) {
+ }
// If the buffer is marked as needing to be updated (for example after the
// screen mode changes) and is the wrong size, then release the old buffer
@@ -581,6 +585,7 @@ void VideoFrameCapturerMac::CgBlitPreLion(const VideoFrameBuffer& buffer,
CGDirectDisplayID main_display = CGMainDisplayID();
uint8* display_base_address =
reinterpret_cast<uint8*>(CGDisplayBaseAddress(main_display));
+ CHECK(display_base_address);
int src_bytes_per_row = CGDisplayBytesPerRow(main_display);
int src_bytes_per_pixel = CGDisplayBitsPerPixel(main_display) / 8;
// TODO(hclam): We can reduce the amount of copying here by subtracting
diff --git a/remoting/host/video_frame_capturer_unittest.cc b/remoting/host/video_frame_capturer_unittest.cc
index 4e857df..306c6ba 100644
--- a/remoting/host/video_frame_capturer_unittest.cc
+++ b/remoting/host/video_frame_capturer_unittest.cc
@@ -61,13 +61,7 @@ TEST_F(VideoFrameCapturerTest, StartCapturer) {
capturer_->Stop();
}
-#if defined(OS_MACOSX)
-#define MAYBE_Capture DISABLED_Capture
-#else
-#define MAYBE_Capture Capture
-#endif
-
-TEST_F(VideoFrameCapturerTest, MAYBE_Capture) {
+TEST_F(VideoFrameCapturerTest, Capture) {
if (!IsOsSupported()) {
return;
}