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" |
11 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
12 #include "remoting/base/base_mock_objects.h" | 12 #include "remoting/codec/codec_test.h" |
13 #include "remoting/base/codec_test.h" | 13 #include "remoting/codec/video_decoder.h" |
14 #include "remoting/base/decoder.h" | 14 #include "remoting/codec/video_encoder.h" |
15 #include "remoting/base/encoder.h" | |
16 #include "remoting/base/util.h" | 15 #include "remoting/base/util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 namespace { | 18 namespace { |
20 | 19 |
21 const int kBytesPerPixel = 4; | 20 const int kBytesPerPixel = 4; |
22 | 21 |
23 // Some sample rects for testing. | 22 // Some sample rects for testing. |
24 std::vector<std::vector<SkIRect> > MakeTestRectLists(const SkISize& size) { | 23 std::vector<std::vector<SkIRect> > MakeTestRectLists(const SkISize& size) { |
25 std::vector<std::vector<SkIRect> > rect_lists; | 24 std::vector<std::vector<SkIRect> > rect_lists; |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 // Check that the decoder correctly re-renders the frame if its client | 487 // Check that the decoder correctly re-renders the frame if its client |
489 // invalidates the frame. | 488 // invalidates the frame. |
490 decoder_tester.ResetRenderedData(); | 489 decoder_tester.ResetRenderedData(); |
491 decoder->Invalidate(view_size, SkRegion(view_rect)); | 490 decoder->Invalidate(view_size, SkRegion(view_rect)); |
492 decoder_tester.RenderFrame(); | 491 decoder_tester.RenderFrame(); |
493 decoder_tester.VerifyResultsApprox(expected_view_data.get(), | 492 decoder_tester.VerifyResultsApprox(expected_view_data.get(), |
494 max_error_limit, mean_error_limit); | 493 max_error_limit, mean_error_limit); |
495 } | 494 } |
496 | 495 |
497 } // namespace remoting | 496 } // namespace remoting |
OLD | NEW |