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