| 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 "components/mus/surfaces/top_level_display_client.h" | 5 #include "components/mus/surfaces/top_level_display_client.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 display_.reset(new cc::Display(this, surfaces_state_->manager(), nullptr, | 47 display_.reset(new cc::Display(this, surfaces_state_->manager(), nullptr, |
| 48 nullptr, cc::RendererSettings(), | 48 nullptr, cc::RendererSettings(), |
| 49 cc_id_.id_namespace())); | 49 cc_id_.id_namespace())); |
| 50 | 50 |
| 51 scoped_refptr<SurfacesContextProvider> surfaces_context_provider( | 51 scoped_refptr<SurfacesContextProvider> surfaces_context_provider( |
| 52 new SurfacesContextProvider(widget, gpu_state)); | 52 new SurfacesContextProvider(widget, gpu_state)); |
| 53 // TODO(rjkroege): If there is something better to do than CHECK, add it. | 53 // TODO(rjkroege): If there is something better to do than CHECK, add it. |
| 54 CHECK(surfaces_context_provider->BindToCurrentThread()); | 54 CHECK(surfaces_context_provider->BindToCurrentThread()); |
| 55 | 55 |
| 56 std::unique_ptr<cc::OutputSurface> output_surface; | 56 std::unique_ptr<cc::OutputSurface> output_surface; |
| 57 if (surfaces_context_provider->ContextCapabilities().gpu.surfaceless) { | 57 if (surfaces_context_provider->ContextCapabilities().surfaceless) { |
| 58 #if defined(USE_OZONE) | 58 #if defined(USE_OZONE) |
| 59 output_surface = base::WrapUnique(new DirectOutputSurfaceOzone( | 59 output_surface = base::WrapUnique(new DirectOutputSurfaceOzone( |
| 60 surfaces_context_provider, widget, task_runner_.get(), GL_TEXTURE_2D, | 60 surfaces_context_provider, widget, task_runner_.get(), GL_TEXTURE_2D, |
| 61 GL_RGB)); | 61 GL_RGB)); |
| 62 #else | 62 #else |
| 63 NOTREACHED(); | 63 NOTREACHED(); |
| 64 #endif | 64 #endif |
| 65 } else { | 65 } else { |
| 66 output_surface = base::WrapUnique( | 66 output_surface = base::WrapUnique( |
| 67 new DirectOutputSurface(surfaces_context_provider, task_runner_.get())); | 67 new DirectOutputSurface(surfaces_context_provider, task_runner_.get())); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 const cc::ReturnedResourceArray& resources) { | 118 const cc::ReturnedResourceArray& resources) { |
| 119 // TODO(fsamuel): Implement this. | 119 // TODO(fsamuel): Implement this. |
| 120 } | 120 } |
| 121 | 121 |
| 122 void TopLevelDisplayClient::SetBeginFrameSource( | 122 void TopLevelDisplayClient::SetBeginFrameSource( |
| 123 cc::BeginFrameSource* begin_frame_source) { | 123 cc::BeginFrameSource* begin_frame_source) { |
| 124 // TODO(tansell): Implement this. | 124 // TODO(tansell): Implement this. |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace mus | 127 } // namespace mus |
| OLD | NEW |