| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/compositor/offscreen_browser_compositor_output_surface
.h" | 5 #include "content/browser/compositor/offscreen_browser_compositor_output_surface
.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_); | 128 gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_); |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 GLenum | 132 GLenum |
| 133 OffscreenBrowserCompositorOutputSurface::GetFramebufferCopyTextureFormat() { | 133 OffscreenBrowserCompositorOutputSurface::GetFramebufferCopyTextureFormat() { |
| 134 return GLCopyTextureInternalFormat(kFboTextureFormat); | 134 return GLCopyTextureInternalFormat(kFboTextureFormat); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void OffscreenBrowserCompositorOutputSurface::SwapBuffers( | 137 void OffscreenBrowserCompositorOutputSurface::SwapBuffers( |
| 138 cc::CompositorFrame* frame) { | 138 std::unique_ptr<cc::CompositorFrame> frame) { |
| 139 if (reflector_) { | 139 if (reflector_) { |
| 140 if (frame->gl_frame_data->sub_buffer_rect == | 140 if (frame->gl_frame_data->sub_buffer_rect == |
| 141 gfx::Rect(frame->gl_frame_data->size)) | 141 gfx::Rect(frame->gl_frame_data->size)) |
| 142 reflector_->OnSourceSwapBuffers(); | 142 reflector_->OnSourceSwapBuffers(); |
| 143 else | 143 else |
| 144 reflector_->OnSourcePostSubBuffer(frame->gl_frame_data->sub_buffer_rect); | 144 reflector_->OnSourcePostSubBuffer(frame->gl_frame_data->sub_buffer_rect); |
| 145 } | 145 } |
| 146 | 146 |
| 147 client_->DidSwapBuffers(); | 147 client_->DidSwapBuffers(); |
| 148 | 148 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 164 if (reflector_) | 164 if (reflector_) |
| 165 EnsureBackbuffer(); | 165 EnsureBackbuffer(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 base::Closure | 168 base::Closure |
| 169 OffscreenBrowserCompositorOutputSurface::CreateCompositionStartedCallback() { | 169 OffscreenBrowserCompositorOutputSurface::CreateCompositionStartedCallback() { |
| 170 return base::Closure(); | 170 return base::Closure(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace content | 173 } // namespace content |
| OLD | NEW |