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

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: 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 scoped_ptr<gpu::MailboxHolder> holder, 150 scoped_ptr<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.Pass(), release_cb, dimensions, gfx::Rect(dimensions), 154 holder.Pass(), release_cb, dimensions, gfx::Rect(dimensions),
155 dimensions, base::TimeDelta(), false); 155 dimensions, base::TimeDelta(), false /* allow_overlay */,
156 true /* has_alpha */);
156 } 157 }
157 158
158 TestBrowserThreadBundle bundle_; 159 TestBrowserThreadBundle bundle_;
159 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_; 160 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_;
160 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_; 161 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_;
161 scoped_ptr<VideoCaptureController> controller_; 162 scoped_ptr<VideoCaptureController> controller_;
162 scoped_ptr<media::VideoCaptureDevice::Client> device_; 163 scoped_ptr<media::VideoCaptureDevice::Client> device_;
163 164
164 private: 165 private:
165 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest); 166 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()); 702 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width());
702 EXPECT_EQ(coded_size.height(), 703 EXPECT_EQ(coded_size.height(),
703 size_and_rotation.output_resolution.height()); 704 size_and_rotation.output_resolution.height());
704 705
705 EXPECT_EQ(kSessionId, controller_->RemoveClient(route_id, client_a_.get())); 706 EXPECT_EQ(kSessionId, controller_->RemoveClient(route_id, client_a_.get()));
706 Mock::VerifyAndClearExpectations(client_a_.get()); 707 Mock::VerifyAndClearExpectations(client_a_.get());
707 } 708 }
708 } 709 }
709 710
710 } // namespace content 711 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698