| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_EXO_BUFFER_H_ | 5 #ifndef COMPONENTS_EXO_BUFFER_H_ | 
| 6 #define COMPONENTS_EXO_BUFFER_H_ | 6 #define COMPONENTS_EXO_BUFFER_H_ | 
| 7 | 7 | 
| 8 #include <memory> | 8 #include <memory> | 
| 9 | 9 | 
| 10 #include "base/callback.h" | 10 #include "base/callback.h" | 
| 11 #include "base/macros.h" | 11 #include "base/macros.h" | 
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" | 
| 13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" | 
| 14 | 14 | 
| 15 namespace base { | 15 namespace base { | 
| 16 namespace trace_event { | 16 namespace trace_event { | 
| 17 class TracedValue; | 17 class TracedValue; | 
| 18 } | 18 } | 
| 19 } | 19 } | 
| 20 | 20 | 
| 21 namespace cc { | 21 namespace cc { | 
| 22 class SingleReleaseCallback; | 22 class SingleReleaseCallback; | 
| 23 class TextureMailbox; | 23 class TextureMailbox; | 
| 24 } | 24 } | 
| 25 | 25 | 
| 26 namespace gfx { | 26 namespace gfx { | 
| 27 class GpuMemoryBuffer; | 27 class GpuMemoryBuffer; | 
| 28 } | 28 } | 
| 29 | 29 | 
| 30 namespace gpu { |  | 
| 31 struct SyncToken; |  | 
| 32 } |  | 
| 33 |  | 
| 34 namespace exo { | 30 namespace exo { | 
| 35 | 31 | 
| 36 // This class provides the content for a Surface. The mechanism by which a | 32 // This class provides the content for a Surface. The mechanism by which a | 
| 37 // client provides and updates the contents is the responsibility of the client | 33 // client provides and updates the contents is the responsibility of the client | 
| 38 // and not defined as part of this class. | 34 // and not defined as part of this class. | 
| 39 class Buffer : public base::SupportsWeakPtr<Buffer> { | 35 class Buffer : public base::SupportsWeakPtr<Buffer> { | 
| 40  public: | 36  public: | 
| 41   explicit Buffer(std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer); | 37   explicit Buffer(std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer); | 
| 42   Buffer(std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer, | 38   Buffer(std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer, | 
| 43          unsigned texture_target, | 39          unsigned texture_target, | 
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 126 | 122 | 
| 127   // The client release callback. | 123   // The client release callback. | 
| 128   base::Closure release_callback_; | 124   base::Closure release_callback_; | 
| 129 | 125 | 
| 130   DISALLOW_COPY_AND_ASSIGN(Buffer); | 126   DISALLOW_COPY_AND_ASSIGN(Buffer); | 
| 131 }; | 127 }; | 
| 132 | 128 | 
| 133 }  // namespace exo | 129 }  // namespace exo | 
| 134 | 130 | 
| 135 #endif  // COMPONENTS_EXO_BUFFER_H_ | 131 #endif  // COMPONENTS_EXO_BUFFER_H_ | 
| OLD | NEW | 
|---|