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

Side by Side Diff: remoting/host/capturer_linux.cc

Issue 5382008: Refactor ZLib and Verbatim encoders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "remoting/host/capturer_linux.h" 5 #include "remoting/host/capturer_linux.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/Xutil.h> 8 #include <X11/Xutil.h>
9 #include <X11/extensions/Xdamage.h> 9 #include <X11/extensions/Xdamage.h>
10 10
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 InvalidRects invalid_rects; 203 InvalidRects invalid_rects;
204 for (int i = 0; i < events_to_process; i++) { 204 for (int i = 0; i < events_to_process; i++) {
205 XNextEvent(display_, &e); 205 XNextEvent(display_, &e);
206 if (e.type == damage_event_base_ + XDamageNotify) { 206 if (e.type == damage_event_base_ + XDamageNotify) {
207 // If we're doing a full screen capture, we should just drain the events. 207 // If we're doing a full screen capture, we should just drain the events.
208 if (!capture_fullscreen_) { 208 if (!capture_fullscreen_) {
209 XDamageNotifyEvent *event = reinterpret_cast<XDamageNotifyEvent*>(&e); 209 XDamageNotifyEvent *event = reinterpret_cast<XDamageNotifyEvent*>(&e);
210 gfx::Rect damage_rect(event->area.x, event->area.y, event->area.width, 210 gfx::Rect damage_rect(event->area.x, event->area.y, event->area.width,
211 event->area.height); 211 event->area.height);
212 invalid_rects.insert(damage_rect); 212 invalid_rects.insert(damage_rect);
213 VLOG(3) << "Damage receved for rect at (" 213 LOG(WARNING) << "Damage receved for rect at ("
garykac 2010/12/02 19:51:31 received
214 << damage_rect.x() << "," << damage_rect.y() << ") size (" 214 << damage_rect.x() << "," << damage_rect.y() << ") size ("
215 << damage_rect.width() << "," << damage_rect.height() << ")"; 215 << damage_rect.width() << "," << damage_rect.height() << ")";
216 } 216 }
217 } else { 217 } else {
218 LOG(WARNING) << "Got unknown event type: " << e.type; 218 LOG(WARNING) << "Got unknown event type: " << e.type;
219 } 219 }
220 } 220 }
221 221
222 if (capture_fullscreen_) { 222 if (capture_fullscreen_) {
223 capturer_->InvalidateFullScreen(); 223 capturer_->InvalidateFullScreen();
224 capture_fullscreen_ = false; 224 // capture_fullscreen_ = false;
Alpha Left Google 2010/12/02 19:39:55 commented out code?
garykac 2010/12/02 19:51:31 Why is this commented out? Does it need a TODO?
Sergey Ulanov 2010/12/03 00:17:21 This wasn't meant to be part of this CL (Linux cap
225 } else { 225 } else {
226 capturer_->InvalidateRects(invalid_rects); 226 capturer_->InvalidateRects(invalid_rects);
227 } 227 }
228 } 228 }
229 229
230 void CapturerLinuxPimpl::CaptureRects( 230 void CapturerLinuxPimpl::CaptureRects(
231 const InvalidRects& rects, 231 const InvalidRects& rects,
232 Capturer::CaptureCompletedCallback* callback) { 232 Capturer::CaptureCompletedCallback* callback) {
233 uint8* buffer = buffers_[capturer_->current_buffer_]; 233 uint8* buffer = buffers_[capturer_->current_buffer_];
234 DataPlanes planes; 234 DataPlanes planes;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 } 339 }
340 } 340 }
341 341
342 // static 342 // static
343 Capturer* Capturer::Create(MessageLoop* message_loop) { 343 Capturer* Capturer::Create(MessageLoop* message_loop) {
344 return new CapturerLinux(message_loop); 344 return new CapturerLinux(message_loop);
345 } 345 }
346 346
347 } // namespace remoting 347 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698