OLD | NEW |
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 #include <deque> | 5 #include <deque> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 scoped_array<uint8> image_data_; | 274 scoped_array<uint8> image_data_; |
275 scoped_refptr<CaptureData> capture_data_; | 275 scoped_refptr<CaptureData> capture_data_; |
276 | 276 |
277 DISALLOW_COPY_AND_ASSIGN(VideoDecoderTester); | 277 DISALLOW_COPY_AND_ASSIGN(VideoDecoderTester); |
278 }; | 278 }; |
279 | 279 |
280 // The VideoEncoderTester provides a hook for retrieving the data, and passing | 280 // The VideoEncoderTester provides a hook for retrieving the data, and passing |
281 // the message to other subprograms for validaton. | 281 // the message to other subprograms for validaton. |
282 class VideoEncoderTester { | 282 class VideoEncoderTester { |
283 public: | 283 public: |
284 VideoEncoderTester(VideoEncoderMessageTester* message_tester) | 284 explicit VideoEncoderTester(VideoEncoderMessageTester* message_tester) |
285 : message_tester_(message_tester), | 285 : message_tester_(message_tester), |
286 decoder_tester_(NULL), | 286 decoder_tester_(NULL), |
287 data_available_(0) { | 287 data_available_(0) { |
288 } | 288 } |
289 | 289 |
290 ~VideoEncoderTester() { | 290 ~VideoEncoderTester() { |
291 EXPECT_GT(data_available_, 0); | 291 EXPECT_GT(data_available_, 0); |
292 } | 292 } |
293 | 293 |
294 void DataAvailable(scoped_ptr<VideoPacket> packet) { | 294 void DataAvailable(scoped_ptr<VideoPacket> packet) { |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 // Check that the decoder correctly re-renders the frame if its client | 477 // Check that the decoder correctly re-renders the frame if its client |
478 // invalidates the frame. | 478 // invalidates the frame. |
479 decoder_tester.ResetRenderedData(); | 479 decoder_tester.ResetRenderedData(); |
480 decoder->Invalidate(view_size, SkRegion(view_rect)); | 480 decoder->Invalidate(view_size, SkRegion(view_rect)); |
481 decoder_tester.RenderFrame(); | 481 decoder_tester.RenderFrame(); |
482 decoder_tester.VerifyResultsApprox(expected_view_data.get(), | 482 decoder_tester.VerifyResultsApprox(expected_view_data.get(), |
483 max_error_limit, mean_error_limit); | 483 max_error_limit, mean_error_limit); |
484 } | 484 } |
485 | 485 |
486 } // namespace remoting | 486 } // namespace remoting |
OLD | NEW |