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

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

Issue 2310953002: Revert of [WebRTC] A real ScreenCapturer test (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 3 months 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/screen_drawer.h
diff --git a/webrtc/modules/desktop_capture/screen_drawer.h b/webrtc/modules/desktop_capture/screen_drawer.h
index d7ec5d186cb7896cb9a16336289b27eb33d1467b..899fc0f043b841f310ec1a2ae3f09f43875cc996 100644
--- a/webrtc/modules/desktop_capture/screen_drawer.h
+++ b/webrtc/modules/desktop_capture/screen_drawer.h
@@ -15,40 +15,30 @@
#include <memory>
-#include "webrtc/modules/desktop_capture/rgba_color.h"
#include "webrtc/modules/desktop_capture/desktop_geometry.h"
namespace webrtc {
-// A set of basic platform dependent functions to draw various shapes on the
-// screen.
+// A set of platform independent functions to draw various of shapes on the
+// screen. This class is for testing ScreenCapturer* implementations only, and
+// should not be used in production logic.
class ScreenDrawer {
public:
- // Creates a ScreenDrawer for the current platform, returns nullptr if no
- // ScreenDrawer implementation available.
+ // Creates a ScreenDrawer for the current platform.
static std::unique_ptr<ScreenDrawer> Create();
ScreenDrawer() {}
virtual ~ScreenDrawer() {}
- // Returns the region inside which DrawRectangle() function are expected to
- // work, in capturer coordinates (assuming ScreenCapturer::SelectScreen has
- // not been called). This region may exclude regions of the screen reserved by
- // the OS for things like menu bars or app launchers.
+ // Returns a rect, on which this instance can draw.
virtual DesktopRect DrawableRegion() = 0;
- // Draws a rectangle to cover |rect| with |color|. Note, rect.bottom() and
- // rect.right() two lines are not included. The part of |rect| which is out of
- // DrawableRegion() will be ignored.
- virtual void DrawRectangle(DesktopRect rect, RgbaColor color) = 0;
+ // Draws a rectangle to cover |rect| with color |rgba|. Note, rect.bottom()
+ // and rect.right() two lines are not included.
+ virtual void DrawRectangle(DesktopRect rect, uint32_t rgba) = 0;
- // Clears all content on the screen by filling the area with black.
+ // Clears all content on the screen.
virtual void Clear() = 0;
-
- // Blocks current thread until OS finishes previous DrawRectangle() actions.
- // ScreenCapturer should be able to capture the changes after this function
- // finish.
- virtual void WaitForPendingDraws() = 0;
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/desktop_capture/screen_capturer_unittest.cc ('k') | webrtc/modules/desktop_capture/screen_drawer_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698