OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_BASE_CURSOR_SHAPE_DATA_H_ | |
6 #define REMOTING_BASE_CURSOR_SHAPE_DATA_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/memory/ref_counted.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "third_party/skia/include/core/SkSize.h" | |
12 | |
13 namespace remoting { | |
14 | |
15 // Stores cursor data to pass to the encoder. | |
16 class CursorShapeData : public base::RefCountedThreadSafe<CursorShapeData> { | |
Wez
2012/05/23 00:01:57
This class just duplicates protocol::CursorShapeIn
Wez
2012/05/23 00:01:57
Why does this need to be RefCountedThreadSafe, rat
garykac
2012/05/26 01:58:01
Done.
garykac
2012/05/26 01:58:01
No longer applicable
| |
17 public: | |
18 CursorShapeData(); | |
19 | |
20 void Initialize(scoped_array<uint8> data, const SkISize& size, | |
21 const SkISize& hotspot, const int bytes_per_pixel); | |
22 | |
23 // Return the cursor size. | |
24 SkISize size() const { return size_; } | |
25 | |
26 // Return the cursor hotspot. | |
27 SkISize hotspot() const { return hotspot_; } | |
28 | |
29 uint8* data() const { return data_.get(); } | |
30 int bytes_per_pixel() const { return bytes_per_pixel_; } | |
31 | |
32 private: | |
33 friend class base::RefCountedThreadSafe<CursorShapeData>; | |
34 virtual ~CursorShapeData(); | |
35 | |
36 scoped_array<uint8> data_; | |
37 SkISize size_; | |
38 SkISize hotspot_; | |
39 int bytes_per_pixel_; | |
40 }; | |
41 | |
42 } // namespace remoting | |
43 | |
44 #endif // REMOTING_BASE_CURSOR_SHAPE_DATA_H_ | |
OLD | NEW |