| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 GLsizei height = 0; | 67 GLsizei height = 0; |
| 68 backbuffer_->texture()->GetLevelSize(GL_TEXTURE_2D, 0, &width, &height); | 68 backbuffer_->texture()->GetLevelSize(GL_TEXTURE_2D, 0, &width, &height); |
| 69 return gfx::Size(width, height); | 69 return gfx::Size(width, height); |
| 70 } | 70 } |
| 71 | 71 |
| 72 virtual ~TextureImageTransportSurface(); | 72 virtual ~TextureImageTransportSurface(); |
| 73 void CreateBackTexture(); | 73 void CreateBackTexture(); |
| 74 void AttachBackTextureToFBO(); | 74 void AttachBackTextureToFBO(); |
| 75 void ReleaseBackTexture(); | 75 void ReleaseBackTexture(); |
| 76 void ReleaseFrontTexture(); | 76 void ReleaseFrontTexture(); |
| 77 void BufferPresentedImpl(const gpu::Mailbox& mailbox_name); | 77 void BufferPresentedImpl(const std::string& mailbox_name); |
| 78 | 78 |
| 79 // The framebuffer that represents this surface (service id). Allocated lazily | 79 // The framebuffer that represents this surface (service id). Allocated lazily |
| 80 // in OnMakeCurrent. | 80 // in OnMakeCurrent. |
| 81 uint32 fbo_id_; | 81 uint32 fbo_id_; |
| 82 | 82 |
| 83 // The current backbuffer. | 83 // The current backbuffer. |
| 84 scoped_refptr<gpu::gles2::TextureRef> backbuffer_; | 84 scoped_refptr<gpu::gles2::TextureRef> backbuffer_; |
| 85 scoped_refptr<gpu::gles2::TextureRef> frontbuffer_; | 85 scoped_refptr<gpu::gles2::TextureRef> frontbuffer_; |
| 86 | 86 |
| 87 // The mailbox name for the current backbuffer texture. Needs to be unique per | 87 // The mailbox name for the current backbuffer texture. Needs to be unique per |
| (...skipping 28 matching lines...) Expand all Loading... |
| 116 // Holds a reference to the mailbox manager for cleanup. | 116 // Holds a reference to the mailbox manager for cleanup. |
| 117 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; | 117 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
| 118 | 118 |
| 119 std::vector<ui::LatencyInfo> latency_info_; | 119 std::vector<ui::LatencyInfo> latency_info_; |
| 120 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface); | 120 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } // namespace content | 123 } // namespace content |
| 124 | 124 |
| 125 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ | 125 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ |
| OLD | NEW |