| 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_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ |
| 6 #define CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "content/common/gpu/gpu_command_buffer_stub.h" | 10 #include "content/common/gpu/gpu_command_buffer_stub.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 virtual void Destroy() OVERRIDE; | 28 virtual void Destroy() OVERRIDE; |
| 29 virtual bool Resize(const gfx::Size& size) OVERRIDE; | 29 virtual bool Resize(const gfx::Size& size) OVERRIDE; |
| 30 virtual bool IsOffscreen() OVERRIDE; | 30 virtual bool IsOffscreen() OVERRIDE; |
| 31 virtual bool SwapBuffers() OVERRIDE; | 31 virtual bool SwapBuffers() OVERRIDE; |
| 32 virtual gfx::Size GetSize() OVERRIDE; | 32 virtual gfx::Size GetSize() OVERRIDE; |
| 33 virtual void* GetHandle() OVERRIDE; | 33 virtual void* GetHandle() OVERRIDE; |
| 34 virtual std::string GetExtensions() OVERRIDE; | 34 virtual std::string GetExtensions() OVERRIDE; |
| 35 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; | 35 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; |
| 36 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 36 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
| 37 virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE; | 37 virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE; |
| 38 virtual void SetBufferAllocation(BufferAllocationState state) OVERRIDE; | 38 virtual void SetBackbufferAllocation(bool allocated) OVERRIDE; |
| 39 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; |
| 39 virtual void* GetShareHandle() OVERRIDE; | 40 virtual void* GetShareHandle() OVERRIDE; |
| 40 virtual void* GetDisplay() OVERRIDE; | 41 virtual void* GetDisplay() OVERRIDE; |
| 41 virtual void* GetConfig() OVERRIDE; | 42 virtual void* GetConfig() OVERRIDE; |
| 42 | 43 |
| 43 protected: | 44 protected: |
| 44 // ImageTransportSurface implementation. | 45 // ImageTransportSurface implementation. |
| 45 virtual void OnNewSurfaceACK( | 46 virtual void OnNewSurfaceACK( |
| 46 uint64 surface_handle, TransportDIB::Handle shm_handle) OVERRIDE; | 47 uint64 surface_handle, TransportDIB::Handle shm_handle) OVERRIDE; |
| 47 virtual void OnBuffersSwappedACK() OVERRIDE; | 48 virtual void OnBuffersSwappedACK() OVERRIDE; |
| 48 virtual void OnPostSubBufferACK() OVERRIDE; | 49 virtual void OnPostSubBufferACK() OVERRIDE; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 Texture textures_[2]; | 87 Texture textures_[2]; |
| 87 | 88 |
| 88 gfx::Rect previous_damage_rect_; | 89 gfx::Rect previous_damage_rect_; |
| 89 | 90 |
| 90 // Indicates which of the 2 above is the front buffer. | 91 // Indicates which of the 2 above is the front buffer. |
| 91 int front_; | 92 int front_; |
| 92 | 93 |
| 93 // Whether or not the command buffer stub has been destroyed. | 94 // Whether or not the command buffer stub has been destroyed. |
| 94 bool stub_destroyed_; | 95 bool stub_destroyed_; |
| 95 | 96 |
| 97 bool backbuffer_suggested_allocation_; |
| 98 bool frontbuffer_suggested_allocation_; |
| 99 |
| 96 scoped_ptr<ImageTransportHelper> helper_; | 100 scoped_ptr<ImageTransportHelper> helper_; |
| 97 GpuCommandBufferStub* parent_stub_; | 101 GpuCommandBufferStub* parent_stub_; |
| 98 | 102 |
| 99 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface); | 103 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface); |
| 100 }; | 104 }; |
| 101 | 105 |
| 102 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ | 106 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ |
| OLD | NEW |