OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual void SetContextLostReason( | 67 virtual void SetContextLostReason( |
68 gpu::error::ContextLostReason reason) OVERRIDE; | 68 gpu::error::ContextLostReason reason) OVERRIDE; |
69 | 69 |
70 // Invoke the task when the channel has been flushed. Takes care of deleting | 70 // Invoke the task when the channel has been flushed. Takes care of deleting |
71 // the task whether the echo succeeds or not. | 71 // the task whether the echo succeeds or not. |
72 bool Echo(const base::Closure& callback); | 72 bool Echo(const base::Closure& callback); |
73 | 73 |
74 // Sends an IPC message with the new state of surface visibility. | 74 // Sends an IPC message with the new state of surface visibility. |
75 bool SetSurfaceVisible(bool visible); | 75 bool SetSurfaceVisible(bool visible); |
76 | 76 |
| 77 bool DiscardBackbuffer(); |
| 78 bool EnsureBackbuffer(); |
| 79 |
77 // Register a callback to invoke whenever we recieve a new memory allocation. | 80 // Register a callback to invoke whenever we recieve a new memory allocation. |
78 void SetMemoryAllocationChangedCallback( | 81 void SetMemoryAllocationChangedCallback( |
79 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& | 82 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& |
80 callback); | 83 callback); |
81 | 84 |
82 // Reparent a command buffer. TODO(apatrick): going forward, the notion of | 85 // Reparent a command buffer. TODO(apatrick): going forward, the notion of |
83 // the parent / child relationship between command buffers is going away in | 86 // the parent / child relationship between command buffers is going away in |
84 // favor of the notion of surfaces that can be drawn to in one command buffer | 87 // favor of the notion of surfaces that can be drawn to in one command buffer |
85 // and bound as a texture in any other. | 88 // and bound as a texture in any other. |
86 virtual bool SetParent(CommandBufferProxy* parent_command_buffer, | 89 virtual bool SetParent(CommandBufferProxy* parent_command_buffer, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 memory_allocation_changed_callback_; | 165 memory_allocation_changed_callback_; |
163 | 166 |
164 GpuConsoleMessageCallback console_message_callback_; | 167 GpuConsoleMessageCallback console_message_callback_; |
165 | 168 |
166 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); | 169 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); |
167 }; | 170 }; |
168 | 171 |
169 #endif // ENABLE_GPU | 172 #endif // ENABLE_GPU |
170 | 173 |
171 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ | 174 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ |
OLD | NEW |