| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager, | 35 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 36 int surface_id); | 36 int surface_id); |
| 37 virtual ~BufferQueue(); | 37 virtual ~BufferQueue(); |
| 38 | 38 |
| 39 void Initialize(); | 39 void Initialize(); |
| 40 | 40 |
| 41 void BindFramebuffer(); | 41 void BindFramebuffer(); |
| 42 void SwapBuffers(const gfx::Rect& damage); | 42 void SwapBuffers(const gfx::Rect& damage); |
| 43 void PageFlipComplete(); | 43 void PageFlipComplete(); |
| 44 void Reshape(const gfx::Size& size, float scale_factor); | 44 void Reshape(const gfx::Size& size, float scale_factor); |
| 45 void RecreateBuffers(); |
| 45 | 46 |
| 46 unsigned int current_texture_id() const { return current_surface_.texture; } | 47 unsigned int current_texture_id() const { return current_surface_.texture; } |
| 47 unsigned int fbo() const { return fbo_; } | 48 unsigned int fbo() const { return fbo_; } |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 friend class BufferQueueTest; | 51 friend class BufferQueueTest; |
| 51 | 52 |
| 52 struct AllocatedSurface { | 53 struct AllocatedSurface { |
| 53 AllocatedSurface() : texture(0), image(0) {} | 54 AllocatedSurface() : texture(0), image(0) {} |
| 54 AllocatedSurface(unsigned int texture, | 55 AllocatedSurface(unsigned int texture, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 GLHelper* gl_helper_; | 88 GLHelper* gl_helper_; |
| 88 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager_; | 89 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 89 int surface_id_; | 90 int surface_id_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(BufferQueue); | 92 DISALLOW_COPY_AND_ASSIGN(BufferQueue); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace content | 95 } // namespace content |
| 95 | 96 |
| 96 #endif // CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_ | 97 #endif // CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_ |
| OLD | NEW |