Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: webrtc/modules/desktop_capture/rgba_color.h

Issue 2500883004: Add DesktopFrame rotation functions (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/rgba_color.h
diff --git a/webrtc/modules/desktop_capture/rgba_color.h b/webrtc/modules/desktop_capture/rgba_color.h
index 1236d03ee67c21c0c13d4c3802a5936ed97ae13a..94471186f19d59ed32dd5f6e232692c98a808028 100644
--- a/webrtc/modules/desktop_capture/rgba_color.h
+++ b/webrtc/modules/desktop_capture/rgba_color.h
@@ -13,8 +13,6 @@
#include <stdint.h>
-#include "webrtc/modules/desktop_capture/desktop_frame.h"
-
namespace webrtc {
// A four-byte structure to store a color in BGRA format. This structure also
@@ -40,6 +38,10 @@ struct RgbaColor final {
// instance from the ToUInt32() result of another RgbaColor instance.
explicit RgbaColor(uint32_t bgra);
+ // Converts an int to uint32_t, and creates a RGBA instance. This constructor
+ // helps users to write RgbaColor(0) without ambiguous conversion error.
+ explicit RgbaColor(int bgra);
+
// Returns true if |this| and |right| is the same color.
bool operator==(const RgbaColor& right) const;
@@ -53,9 +55,6 @@ struct RgbaColor final {
uint8_t red;
uint8_t alpha;
};
-static_assert(
- DesktopFrame::kBytesPerPixel == sizeof(RgbaColor),
- "A pixel in DesktopFrame should be safe to be represented by a RgbaColor");
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698