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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller_unittest.cc

Issue 1134643002: Add distinction between RGB and RGBA native texture video frames and resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test breakage from bad merge Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Unit test for VideoCaptureController. 5 // Unit test for VideoCaptureController.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 base::TimeDelta(), 145 base::TimeDelta(),
146 base::Closure()); 146 base::Closure());
147 } 147 }
148 148
149 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( 149 scoped_refptr<media::VideoFrame> WrapMailboxBuffer(
150 const gpu::MailboxHolder& holder, 150 const gpu::MailboxHolder& holder,
151 const media::VideoFrame::ReleaseMailboxCB& release_cb, 151 const media::VideoFrame::ReleaseMailboxCB& release_cb,
152 gfx::Size dimensions) { 152 gfx::Size dimensions) {
153 return media::VideoFrame::WrapNativeTexture( 153 return media::VideoFrame::WrapNativeTexture(
154 holder, release_cb, dimensions, gfx::Rect(dimensions), dimensions, 154 holder, release_cb, dimensions, gfx::Rect(dimensions), dimensions,
155 base::TimeDelta(), false); 155 base::TimeDelta(), false /* allow_overlay */, true /* has_alpha */);
156 } 156 }
157 157
158 TestBrowserThreadBundle bundle_; 158 TestBrowserThreadBundle bundle_;
159 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_; 159 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_;
160 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_; 160 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_;
161 scoped_ptr<VideoCaptureController> controller_; 161 scoped_ptr<VideoCaptureController> controller_;
162 scoped_ptr<media::VideoCaptureDevice::Client> device_; 162 scoped_ptr<media::VideoCaptureDevice::Client> device_;
163 163
164 private: 164 private:
165 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest); 165 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest);
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); 701 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width());
702 EXPECT_EQ(coded_size.height(), 702 EXPECT_EQ(coded_size.height(),
703 size_and_rotation.output_resolution.height()); 703 size_and_rotation.output_resolution.height());
704 704
705 EXPECT_EQ(kSessionId, controller_->RemoveClient(route_id, client_a_.get())); 705 EXPECT_EQ(kSessionId, controller_->RemoveClient(route_id, client_a_.get()));
706 Mock::VerifyAndClearExpectations(client_a_.get()); 706 Mock::VerifyAndClearExpectations(client_a_.get());
707 } 707 }
708 } 708 }
709 709
710 } // namespace content 710 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698