| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "gpu/ipc/service/direct_composition_surface_win.h" | 5 #include "gpu/ipc/service/direct_composition_surface_win.h" |
| 6 | 6 |
| 7 #include <d3d11_1.h> | 7 #include <d3d11_1.h> |
| 8 #include <dcomptypes.h> | 8 #include <dcomptypes.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 void DCLayerTree::InitializeVideoProcessor(const gfx::Size& input_size, | 273 void DCLayerTree::InitializeVideoProcessor(const gfx::Size& input_size, |
| 274 const gfx::Size& output_size) { | 274 const gfx::Size& output_size) { |
| 275 if (SizeContains(video_input_size_, input_size) && | 275 if (SizeContains(video_input_size_, input_size) && |
| 276 SizeContains(video_output_size_, output_size)) | 276 SizeContains(video_output_size_, output_size)) |
| 277 return; | 277 return; |
| 278 video_input_size_ = input_size; | 278 video_input_size_ = input_size; |
| 279 video_output_size_ = output_size; | 279 video_output_size_ = output_size; |
| 280 | 280 |
| 281 video_processor_.Reset(); | 281 video_processor_.Reset(); |
| 282 video_processor_enumerator_.Receive(); | 282 video_processor_enumerator_.Reset(); |
| 283 D3D11_VIDEO_PROCESSOR_CONTENT_DESC desc = {}; | 283 D3D11_VIDEO_PROCESSOR_CONTENT_DESC desc = {}; |
| 284 desc.InputFrameFormat = D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE; | 284 desc.InputFrameFormat = D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE; |
| 285 desc.InputFrameRate.Numerator = 60; | 285 desc.InputFrameRate.Numerator = 60; |
| 286 desc.InputFrameRate.Denominator = 1; | 286 desc.InputFrameRate.Denominator = 1; |
| 287 desc.InputWidth = input_size.width(); | 287 desc.InputWidth = input_size.width(); |
| 288 desc.InputHeight = input_size.height(); | 288 desc.InputHeight = input_size.height(); |
| 289 desc.OutputFrameRate.Numerator = 60; | 289 desc.OutputFrameRate.Numerator = 60; |
| 290 desc.OutputFrameRate.Denominator = 1; | 290 desc.OutputFrameRate.Denominator = 1; |
| 291 desc.OutputWidth = output_size.width(); | 291 desc.OutputWidth = output_size.width(); |
| 292 desc.OutputHeight = output_size.height(); | 292 desc.OutputHeight = output_size.height(); |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { | 1157 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { |
| 1158 return child_window_.GetTaskRunnerForTesting(); | 1158 return child_window_.GetTaskRunnerForTesting(); |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 base::win::ScopedComPtr<IDXGISwapChain1> | 1161 base::win::ScopedComPtr<IDXGISwapChain1> |
| 1162 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { | 1162 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { |
| 1163 return layer_tree_->GetLayerSwapChainForTesting(index); | 1163 return layer_tree_->GetLayerSwapChainForTesting(index); |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 } // namespace gpu | 1166 } // namespace gpu |
| OLD | NEW |