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

Unified Diff: remoting/host/capturer.cc

Issue 2690003: Copy the (early prototype of) remoting in Chrome into the public tree.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
« no previous file with comments | « remoting/host/capturer.h ('k') | remoting/host/capturer_fake.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capturer.cc
===================================================================
--- remoting/host/capturer.cc (revision 0)
+++ remoting/host/capturer.cc (revision 0)
@@ -0,0 +1,49 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/host/capturer.h"
+
+namespace remoting {
+
+Capturer::Capturer()
+ : width_(0),
+ height_(0),
+ pixel_format_(chromotocol_pb::PixelFormatInvalid),
+ bytes_per_pixel_(0),
+ bytes_per_row_(0),
+ current_buffer_(0) {
+}
+
+Capturer::~Capturer() {
+}
+
+void Capturer::GetDirtyRects(DirtyRects* rects) const {
+ *rects = dirty_rects_;
+}
+
+int Capturer::GetWidth() const {
+ return width_;
+}
+
+int Capturer::GetHeight() const {
+ return height_;
+}
+
+chromotocol_pb::PixelFormat Capturer::GetPixelFormat() const {
+ return pixel_format_;
+}
+
+void Capturer::InvalidateRect(gfx::Rect dirty_rect) {
+ inval_rects_.push_back(dirty_rect);
+}
+
+void Capturer::FinishCapture(Task* done_task) {
+ done_task->Run();
+ delete done_task;
+
+ // Select the next buffer to be the current buffer.
+ current_buffer_ = ++current_buffer_ % kNumBuffers;
+}
+
+} // namespace remoting
Property changes on: remoting/host/capturer.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « remoting/host/capturer.h ('k') | remoting/host/capturer_fake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698