Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: content/common/gpu/texture_image_transport_surface.h

Issue 12440005: Use gpu::Mailbox in IPCs instead of std::string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "content/common/gpu/gpu_command_buffer_stub.h" 11 #include "content/common/gpu/gpu_command_buffer_stub.h"
12 #include "content/common/gpu/image_transport_surface.h" 12 #include "content/common/gpu/image_transport_surface.h"
13 #include "gpu/command_buffer/common/mailbox.h"
13 #include "gpu/command_buffer/service/mailbox_manager.h" 14 #include "gpu/command_buffer/service/mailbox_manager.h"
14 #include "gpu/command_buffer/service/texture_manager.h" 15 #include "gpu/command_buffer/service/texture_manager.h"
15 #include "ui/gl/gl_context.h" 16 #include "ui/gl/gl_context.h"
16 #include "ui/gl/gl_surface.h" 17 #include "ui/gl/gl_surface.h"
17 18
18 namespace content { 19 namespace content {
19 class GpuChannelManager; 20 class GpuChannelManager;
20 21
21 class TextureImageTransportSurface 22 class TextureImageTransportSurface
22 : public ImageTransportSurface, 23 : public ImageTransportSurface,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ~Texture(); 65 ~Texture();
65 66
66 // The currently allocated size. 67 // The currently allocated size.
67 gfx::Size size; 68 gfx::Size size;
68 69
69 // The actual GL texture id. 70 // The actual GL texture id.
70 uint32 service_id; 71 uint32 service_id;
71 72
72 // The mailbox name for the current service_id. Needs to be unique per 73 // The mailbox name for the current service_id. Needs to be unique per
73 // GL texture and is invalid while service_id is zero. 74 // GL texture and is invalid while service_id is zero.
74 gpu::gles2::MailboxName mailbox_name; 75 gpu::Mailbox mailbox_name;
75 }; 76 };
76 77
77 virtual ~TextureImageTransportSurface(); 78 virtual ~TextureImageTransportSurface();
78 void CreateBackTexture(); 79 void CreateBackTexture();
79 void AttachBackTextureToFBO(); 80 void AttachBackTextureToFBO();
80 void ReleaseBackTexture(); 81 void ReleaseBackTexture();
81 void BufferPresentedImpl(const std::string& mailbox_name); 82 void BufferPresentedImpl(const gpu::Mailbox& mailbox_name);
82 void ProduceTexture(Texture* texture); 83 void ProduceTexture(Texture* texture);
83 void ConsumeTexture(Texture* texture); 84 void ConsumeTexture(Texture* texture);
84 85
85 // The framebuffer that represents this surface (service id). Allocated lazily 86 // The framebuffer that represents this surface (service id). Allocated lazily
86 // in OnMakeCurrent. 87 // in OnMakeCurrent.
87 uint32 fbo_id_; 88 uint32 fbo_id_;
88 89
89 // The current backbuffer. 90 // The current backbuffer.
90 Texture backbuffer_; 91 Texture backbuffer_;
91 92
(...skipping 25 matching lines...) Expand all
117 118
118 // Holds a reference to the mailbox manager for cleanup. 119 // Holds a reference to the mailbox manager for cleanup.
119 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; 120 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
120 121
121 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface); 122 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface);
122 }; 123 };
123 124
124 } // namespace content 125 } // namespace content
125 126
126 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ 127 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698