OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CC_RESOURCES_SHARED_BITMAP_H_ | 5 #ifndef CC_RESOURCES_SHARED_BITMAP_H_ |
6 #define CC_RESOURCES_SHARED_BITMAP_H_ | 6 #define CC_RESOURCES_SHARED_BITMAP_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "cc/base/cc_export.h" | |
10 #include "gpu/command_buffer/common/mailbox.h" | 9 #include "gpu/command_buffer/common/mailbox.h" |
11 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
12 | 11 |
13 namespace cc { | 12 namespace cc { |
14 typedef gpu::Mailbox SharedBitmapId; | 13 typedef gpu::Mailbox SharedBitmapId; |
15 | 14 |
16 class CC_EXPORT SharedBitmap { | 15 class SharedBitmap { |
17 public: | 16 public: |
18 SharedBitmap(uint8* pixels, const SharedBitmapId& id); | 17 SharedBitmap(uint8* pixels, const SharedBitmapId& id); |
19 | 18 |
20 virtual ~SharedBitmap(); | 19 virtual ~SharedBitmap(); |
21 | 20 |
22 uint8* pixels() { return pixels_; } | 21 uint8* pixels() { return pixels_; } |
23 | 22 |
24 const SharedBitmapId& id() { return id_; } | 23 const SharedBitmapId& id() { return id_; } |
25 | 24 |
26 // Returns true if the size is valid and false otherwise. | 25 // Returns true if the size is valid and false otherwise. |
(...skipping 12 matching lines...) Expand all Loading... |
39 private: | 38 private: |
40 uint8* pixels_; | 39 uint8* pixels_; |
41 SharedBitmapId id_; | 40 SharedBitmapId id_; |
42 | 41 |
43 DISALLOW_COPY_AND_ASSIGN(SharedBitmap); | 42 DISALLOW_COPY_AND_ASSIGN(SharedBitmap); |
44 }; | 43 }; |
45 | 44 |
46 } // namespace cc | 45 } // namespace cc |
47 | 46 |
48 #endif // CC_RESOURCES_SHARED_BITMAP_H_ | 47 #endif // CC_RESOURCES_SHARED_BITMAP_H_ |
OLD | NEW |