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

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

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra LOGs Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_fake.h" 5 #include "remoting/host/capturer_fake.h"
6 6
7 #include "remoting/base/capture_data.h"
8
7 namespace remoting { 9 namespace remoting {
8 10
9 // CapturerFake generates a white picture of size kWidth x kHeight with a 11 // CapturerFake generates a white picture of size kWidth x kHeight with a
10 // rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed pixels 12 // rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed pixels
11 // per frame along both axes, and bounces off the sides of the screen. 13 // per frame along both axes, and bounces off the sides of the screen.
12 static const int kWidth = 800; 14 static const int kWidth = 800;
13 static const int kHeight = 600; 15 static const int kHeight = 600;
14 static const int kBoxWidth = 140; 16 static const int kBoxWidth = 140;
15 static const int kBoxHeight = 140; 17 static const int kBoxHeight = 140;
16 static const int kSpeed = 20; 18 static const int kSpeed = 20;
(...skipping 18 matching lines...) Expand all
35 37
36 CapturerFake::~CapturerFake() { 38 CapturerFake::~CapturerFake() {
37 } 39 }
38 40
39 void CapturerFake::Start() { 41 void CapturerFake::Start() {
40 } 42 }
41 43
42 void CapturerFake::Stop() { 44 void CapturerFake::Stop() {
43 } 45 }
44 46
47 void CapturerFake::SetCursorShapeChangedCallback(
48 const CursorShapeChangedCallback& callback) {
49 }
50
45 void CapturerFake::ScreenConfigurationChanged() { 51 void CapturerFake::ScreenConfigurationChanged() {
46 size_ = SkISize::Make(kWidth, kHeight); 52 size_ = SkISize::Make(kWidth, kHeight);
47 bytes_per_row_ = size_.width() * kBytesPerPixel; 53 bytes_per_row_ = size_.width() * kBytesPerPixel;
48 pixel_format_ = media::VideoFrame::RGB32; 54 pixel_format_ = media::VideoFrame::RGB32;
49 55
50 // Create memory for the buffers. 56 // Create memory for the buffers.
51 int buffer_size = size_.height() * bytes_per_row_; 57 int buffer_size = size_.height() * bytes_per_row_;
52 for (int i = 0; i < kNumBuffers; i++) { 58 for (int i = 0; i < kNumBuffers; i++) {
53 buffers_[i].reset(new uint8[buffer_size]); 59 buffers_[i].reset(new uint8[buffer_size]);
54 } 60 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 row[x * kBytesPerPixel] = r; 134 row[x * kBytesPerPixel] = r;
129 row[x * kBytesPerPixel+1] = g; 135 row[x * kBytesPerPixel+1] = g;
130 row[x * kBytesPerPixel+2] = b; 136 row[x * kBytesPerPixel+2] = b;
131 row[x * kBytesPerPixel+3] = 0xff; 137 row[x * kBytesPerPixel+3] = 0xff;
132 } 138 }
133 row += bytes_per_row_; 139 row += bytes_per_row_;
134 } 140 }
135 } 141 }
136 142
137 } // namespace remoting 143 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698