| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 reflector_->OnSourceTextureMailboxUpdated(nullptr); | 101 reflector_->OnSourceTextureMailboxUpdated(nullptr); |
| 102 } | 102 } |
| 103 | 103 |
| 104 if (fbo_) { | 104 if (fbo_) { |
| 105 gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_); | 105 gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_); |
| 106 gl->DeleteFramebuffers(1, &fbo_); | 106 gl->DeleteFramebuffers(1, &fbo_); |
| 107 fbo_ = 0; | 107 fbo_ = 0; |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 void OffscreenBrowserCompositorOutputSurface::SetDrawRectangle( |
| 112 const gfx::Rect& draw_rectangle) { |
| 113 NOTREACHED(); |
| 114 } |
| 115 |
| 111 void OffscreenBrowserCompositorOutputSurface::Reshape( | 116 void OffscreenBrowserCompositorOutputSurface::Reshape( |
| 112 const gfx::Size& size, | 117 const gfx::Size& size, |
| 113 float scale_factor, | 118 float scale_factor, |
| 114 const gfx::ColorSpace& color_space, | 119 const gfx::ColorSpace& color_space, |
| 115 bool alpha, | 120 bool alpha, |
| 116 bool stencil) { | 121 bool stencil) { |
| 117 reshape_size_ = size; | 122 reshape_size_ = size; |
| 118 DiscardBackbuffer(); | 123 DiscardBackbuffer(); |
| 119 EnsureBackbuffer(); | 124 EnsureBackbuffer(); |
| 120 } | 125 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 191 } |
| 187 } | 192 } |
| 188 | 193 |
| 189 void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete( | 194 void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete( |
| 190 const std::vector<ui::LatencyInfo>& latency_info) { | 195 const std::vector<ui::LatencyInfo>& latency_info) { |
| 191 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 196 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); |
| 192 client_->DidReceiveSwapBuffersAck(); | 197 client_->DidReceiveSwapBuffersAck(); |
| 193 } | 198 } |
| 194 | 199 |
| 195 } // namespace content | 200 } // namespace content |
| OLD | NEW |