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 #include "content/renderer/gpu/mailbox_output_surface.h" | 5 #include "content/renderer/gpu/mailbox_output_surface.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
9 #include "cc/output/compositor_frame_ack.h" | 9 #include "cc/output/compositor_frame_ack.h" |
10 #include "cc/output/gl_frame_data.h" | 10 #include "cc/output/gl_frame_data.h" |
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 11 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
12 #include "third_party/khronos/GLES2/gl2.h" | 12 #include "third_party/khronos/GLES2/gl2.h" |
13 #include "third_party/khronos/GLES2/gl2ext.h" | 13 #include "third_party/khronos/GLES2/gl2ext.h" |
14 | 14 |
15 using cc::CompositorFrame; | 15 using cc::CompositorFrame; |
16 using cc::GLFrameData; | 16 using cc::GLFrameData; |
17 using gpu::Mailbox; | 17 using gpu::Mailbox; |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 MailboxOutputSurface::MailboxOutputSurface( | 21 MailboxOutputSurface::MailboxOutputSurface( |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 context3d_->bindTexture(GL_TEXTURE_2D, frame.texture_id); | 217 context3d_->bindTexture(GL_TEXTURE_2D, frame.texture_id); |
218 context3d_->consumeTextureCHROMIUM(GL_TEXTURE_2D, frame.mailbox.name); | 218 context3d_->consumeTextureCHROMIUM(GL_TEXTURE_2D, frame.mailbox.name); |
219 } | 219 } |
220 | 220 |
221 size_t MailboxOutputSurface::GetNumAcksPending() { | 221 size_t MailboxOutputSurface::GetNumAcksPending() { |
222 DCHECK(pending_textures_.size()); | 222 DCHECK(pending_textures_.size()); |
223 return pending_textures_.size() - 1; | 223 return pending_textures_.size() - 1; |
224 } | 224 } |
225 | 225 |
226 } // namespace content | 226 } // namespace content |
OLD | NEW |