| 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_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 public: | 62 public: |
| 63 virtual ~GpuCommandBufferStubBase() {} | 63 virtual ~GpuCommandBufferStubBase() {} |
| 64 | 64 |
| 65 // Will not have surface state if this is an offscreen commandbuffer. | 65 // Will not have surface state if this is an offscreen commandbuffer. |
| 66 virtual bool client_has_memory_allocation_changed_callback() const = 0; | 66 virtual bool client_has_memory_allocation_changed_callback() const = 0; |
| 67 virtual bool has_surface_state() const = 0; | 67 virtual bool has_surface_state() const = 0; |
| 68 virtual const SurfaceState& surface_state() const = 0; | 68 virtual const SurfaceState& surface_state() const = 0; |
| 69 | 69 |
| 70 virtual gfx::Size GetSurfaceSize() const = 0; |
| 71 |
| 70 virtual bool IsInSameContextShareGroup( | 72 virtual bool IsInSameContextShareGroup( |
| 71 const GpuCommandBufferStubBase& other) const = 0; | 73 const GpuCommandBufferStubBase& other) const = 0; |
| 72 | 74 |
| 73 virtual void SendMemoryAllocationToProxy( | 75 virtual void SendMemoryAllocationToProxy( |
| 74 const GpuMemoryAllocation& allocation) = 0; | 76 const GpuMemoryAllocation& allocation) = 0; |
| 75 | 77 |
| 76 virtual void SetMemoryAllocation( | 78 virtual void SetMemoryAllocation( |
| 77 const GpuMemoryAllocation& allocation) = 0; | 79 const GpuMemoryAllocation& allocation) = 0; |
| 78 }; | 80 }; |
| 79 | 81 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 115 |
| 114 // IPC::Message::Sender implementation: | 116 // IPC::Message::Sender implementation: |
| 115 virtual bool Send(IPC::Message* msg) OVERRIDE; | 117 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 116 | 118 |
| 117 // GpuCommandBufferStubBase implementation: | 119 // GpuCommandBufferStubBase implementation: |
| 118 virtual bool client_has_memory_allocation_changed_callback() const OVERRIDE; | 120 virtual bool client_has_memory_allocation_changed_callback() const OVERRIDE; |
| 119 virtual bool has_surface_state() const OVERRIDE; | 121 virtual bool has_surface_state() const OVERRIDE; |
| 120 virtual const GpuCommandBufferStubBase::SurfaceState& surface_state() const | 122 virtual const GpuCommandBufferStubBase::SurfaceState& surface_state() const |
| 121 OVERRIDE; | 123 OVERRIDE; |
| 122 | 124 |
| 125 // Returns surface size. |
| 126 virtual gfx::Size GetSurfaceSize() const OVERRIDE; |
| 127 |
| 123 // Returns true iff |other| is in the same context share group as this stub. | 128 // Returns true iff |other| is in the same context share group as this stub. |
| 124 virtual bool IsInSameContextShareGroup( | 129 virtual bool IsInSameContextShareGroup( |
| 125 const GpuCommandBufferStubBase& other) const OVERRIDE; | 130 const GpuCommandBufferStubBase& other) const OVERRIDE; |
| 126 | 131 |
| 127 // Sends memory allocation limits to render process. | 132 // Sends memory allocation limits to render process. |
| 128 virtual void SendMemoryAllocationToProxy( | 133 virtual void SendMemoryAllocationToProxy( |
| 129 const GpuMemoryAllocation& allocation) OVERRIDE; | 134 const GpuMemoryAllocation& allocation) OVERRIDE; |
| 130 | 135 |
| 131 // Sets buffer usage depending on Memory Allocation | 136 // Sets buffer usage depending on Memory Allocation |
| 132 virtual void SetMemoryAllocation( | 137 virtual void SetMemoryAllocation( |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; | 262 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; |
| 258 | 263 |
| 259 ObserverList<DestructionObserver> destruction_observers_; | 264 ObserverList<DestructionObserver> destruction_observers_; |
| 260 | 265 |
| 261 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 266 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 262 }; | 267 }; |
| 263 | 268 |
| 264 #endif // defined(ENABLE_GPU) | 269 #endif // defined(ENABLE_GPU) |
| 265 | 270 |
| 266 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 271 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |