| 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 "base/trace_event/memory_allocator_dump.h" |
| 9 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 10 #include "gpu/command_buffer/common/mailbox.h" | 11 #include "gpu/command_buffer/common/mailbox.h" |
| 11 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
| 12 | 13 |
| 13 namespace cc { | 14 namespace cc { |
| 14 typedef gpu::Mailbox SharedBitmapId; | 15 typedef gpu::Mailbox SharedBitmapId; |
| 15 | 16 |
| 17 CC_EXPORT base::trace_event::MemoryAllocatorDumpGuid |
| 18 GetSharedBitmapGUIDForTracing(const SharedBitmapId& bitmap_id); |
| 19 |
| 16 class CC_EXPORT SharedBitmap { | 20 class CC_EXPORT SharedBitmap { |
| 17 public: | 21 public: |
| 18 SharedBitmap(uint8* pixels, const SharedBitmapId& id); | 22 SharedBitmap(uint8* pixels, const SharedBitmapId& id); |
| 19 | 23 |
| 20 virtual ~SharedBitmap(); | 24 virtual ~SharedBitmap(); |
| 21 | 25 |
| 22 uint8* pixels() { return pixels_; } | 26 uint8* pixels() { return pixels_; } |
| 23 | 27 |
| 24 const SharedBitmapId& id() { return id_; } | 28 const SharedBitmapId& id() { return id_; } |
| 25 | 29 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 39 private: | 43 private: |
| 40 uint8* pixels_; | 44 uint8* pixels_; |
| 41 SharedBitmapId id_; | 45 SharedBitmapId id_; |
| 42 | 46 |
| 43 DISALLOW_COPY_AND_ASSIGN(SharedBitmap); | 47 DISALLOW_COPY_AND_ASSIGN(SharedBitmap); |
| 44 }; | 48 }; |
| 45 | 49 |
| 46 } // namespace cc | 50 } // namespace cc |
| 47 | 51 |
| 48 #endif // CC_RESOURCES_SHARED_BITMAP_H_ | 52 #endif // CC_RESOURCES_SHARED_BITMAP_H_ |
| OLD | NEW |