| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser_compositor_output_surface.h" | 5 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" | 10 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" |
| 11 #include "content/browser/compositor/owned_mailbox.h" |
| 11 #include "content/browser/compositor/reflector_impl.h" | 12 #include "content/browser/compositor/reflector_impl.h" |
| 12 #include "content/common/gpu/client/context_provider_command_buffer.h" | 13 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 | 16 |
| 16 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( | 17 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( |
| 17 const scoped_refptr<cc::ContextProvider>& context_provider, | 18 const scoped_refptr<cc::ContextProvider>& context_provider, |
| 18 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 19 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 19 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 20 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 20 overlay_candidate_validator) | 21 overlay_candidate_validator) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 74 |
| 74 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { | 75 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { |
| 75 // Software mirroring is done by doing a GL copy out of the framebuffer - if | 76 // Software mirroring is done by doing a GL copy out of the framebuffer - if |
| 76 // we have overlays then that data will be missing. | 77 // we have overlays then that data will be missing. |
| 77 if (overlay_candidate_validator_) { | 78 if (overlay_candidate_validator_) { |
| 78 overlay_candidate_validator_->SetSoftwareMirrorMode(reflector != nullptr); | 79 overlay_candidate_validator_->SetSoftwareMirrorMode(reflector != nullptr); |
| 79 } | 80 } |
| 80 reflector_ = reflector; | 81 reflector_ = reflector; |
| 81 } | 82 } |
| 82 | 83 |
| 84 scoped_refptr<OwnedMailbox> |
| 85 BrowserCompositorOutputSurface::GetTextureMailbox() { |
| 86 return scoped_refptr<OwnedMailbox>(); |
| 87 } |
| 88 |
| 89 base::Closure |
| 90 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() { |
| 91 return base::Closure(); |
| 92 } |
| 93 |
| 83 cc::OverlayCandidateValidator* | 94 cc::OverlayCandidateValidator* |
| 84 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { | 95 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { |
| 85 return overlay_candidate_validator_.get(); | 96 return overlay_candidate_validator_.get(); |
| 86 } | 97 } |
| 87 | 98 |
| 88 } // namespace content | 99 } // namespace content |
| OLD | NEW |