OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <limits> | 5 #include <limits> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "remoting/base/capture_data.h" | 10 #include "remoting/base/capture_data.h" |
11 #include "remoting/base/codec_test.h" | 11 #include "remoting/base/codec_test.h" |
12 #include "remoting/base/encoder_vp8.h" | 12 #include "remoting/base/encoder_vp8.h" |
13 #include "remoting/proto/video.pb.h" | 13 #include "remoting/proto/video.pb.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 const int kIntMax = std::numeric_limits<int>::max(); | 18 const int kIntMax = std::numeric_limits<int>::max(); |
19 | 19 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 EXPECT_TRUE(EncoderVp8::AlignAndClipRect(r1, 50, 50).IsEmpty()); | 77 EXPECT_TRUE(EncoderVp8::AlignAndClipRect(r1, 50, 50).IsEmpty()); |
78 | 78 |
79 // Clipping to odd-sized screen. An unlikely case, and we might not deal | 79 // Clipping to odd-sized screen. An unlikely case, and we might not deal |
80 // with it cleanly in the encoder (we possibly lose 1px at right & bottom | 80 // with it cleanly in the encoder (we possibly lose 1px at right & bottom |
81 // of screen). | 81 // of screen). |
82 EXPECT_EQ(EncoderVp8::AlignAndClipRect(r1, 199, 299), | 82 EXPECT_EQ(EncoderVp8::AlignAndClipRect(r1, 199, 299), |
83 gfx::Rect(100, 200, 98, 98)); | 83 gfx::Rect(100, 200, 98, 98)); |
84 } | 84 } |
85 | 85 |
86 } // namespace remoting | 86 } // namespace remoting |
OLD | NEW |