Chromium Code Reviews| Index: remoting/test/test_video_renderer.h |
| diff --git a/remoting/test/test_video_renderer.h b/remoting/test/test_video_renderer.h |
| index b9a84f7ff697e02520984054ba5366c7b7fb9b7b..d5d86fa725ea2959301ed37b32dcca395c0b8462 100644 |
| --- a/remoting/test/test_video_renderer.h |
| +++ b/remoting/test/test_video_renderer.h |
| @@ -23,11 +23,32 @@ class DesktopFrame; |
| class DesktopRect; |
| } |
| -typedef uint32 RgbaColor; |
| - |
| namespace remoting { |
| namespace test { |
| +typedef uint32 RGBA32; |
|
Sergey Ulanov
2015/07/09 19:43:15
uint32_t . uint32 is a non-standard type used in o
liaoyuke
2015/07/09 23:21:01
Done.
|
| + |
| +// RGB Color triplets with alpha values as 0xff, and it is represented in ARGB |
| +// format. |
| +struct RGBColor { |
|
Sergey Ulanov
2015/07/09 19:43:15
this is a class, not struct. https://google-styleg
liaoyuke
2015/07/09 23:21:01
Done.
|
| + public: |
| + RGBColor() : color_(0xFF000000) {} |
| + explicit RGBColor(RGBA32 color) : color_(color) {} |
|
Sergey Ulanov
2015/07/09 19:43:15
Not sure why you need this. Default copy construct
liaoyuke
2015/07/09 23:21:02
I have this default constructor only because I don
|
| + RGBColor(int red, int green, int blue); |
| + |
| + // Return values on Red, Green, Blue channels. |
| + int GetRed() const; |
|
Sergey Ulanov
2015/07/09 19:43:15
These can be inline, red() green() and blue()
See
liaoyuke
2015/07/09 23:21:01
Done.
|
| + int GetGreen() const; |
| + int GetBlue() const; |
| + |
| + // Setters for color; |
| + void SetRGB(int red, int green, int blue); |
|
Sergey Ulanov
2015/07/09 19:43:15
Call it Set()
liaoyuke
2015/07/09 23:21:01
Done.
|
| + void SetRGB(RGBA32 color) { color_ = color; } |
| + |
| + private: |
| + RGBA32 color_; |
|
Sergey Ulanov
2015/07/09 19:43:15
would it be better to store red green and blue cha
liaoyuke
2015/07/09 23:21:01
Yeah, I think it would simplify the code and be mo
|
| +}; |
| + |
| // Processes video packets as they are received from the remote host. Must be |
| // used from a thread running a message loop and this class will use that |
| // message loop to execute the done callbacks passed by the caller of |
| @@ -61,7 +82,7 @@ class TestVideoRenderer : public VideoRenderer, public protocol::VideoStub { |
| // when the pattern is matched. |
| void SetImagePatternAndMatchedCallback( |
| const webrtc::DesktopRect& expected_rect, |
| - const RgbaColor& expected_color, |
| + const RGBA32& expected_color, |
| const base::Closure& image_pattern_matched_callback); |
| private: |