From 1f4bb9e8d93accfc080f62b419ca312d1f48f11e Mon Sep 17 00:00:00 2001 From: "jamiewalch@chromium.org" Date: Sat, 21 Jul 2012 00:26:07 +0000 Subject: 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 --- remoting/host/video_frame_capturer_mac.mm | 7 ++++++- remoting/host/video_frame_capturer_unittest.cc | 8 +------- 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(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; } -- cgit v1.1