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 "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #define EGL_ANGLE_d3d_texture_client_buffer 1 | 40 #define EGL_ANGLE_d3d_texture_client_buffer 1 |
41 #define EGL_D3D_TEXTURE_ANGLE 0x33A3 | 41 #define EGL_D3D_TEXTURE_ANGLE 0x33A3 |
42 #endif /* EGL_ANGLE_d3d_texture_client_buffer */ | 42 #endif /* EGL_ANGLE_d3d_texture_client_buffer */ |
43 | 43 |
44 namespace gpu { | 44 namespace gpu { |
45 namespace { | 45 namespace { |
46 | 46 |
47 // Some drivers fail to correctly handle BT.709 video in overlays. This flag | 47 // Some drivers fail to correctly handle BT.709 video in overlays. This flag |
48 // converts them to BT.601 in the video processor. | 48 // converts them to BT.601 in the video processor. |
49 const base::Feature kFallbackBT709VideoToBT601{ | 49 const base::Feature kFallbackBT709VideoToBT601{ |
50 "FallbackBT709VideoToBT601", base::FEATURE_ENABLED_BY_DEFAULT}; | 50 "FallbackBT709VideoToBT601", base::FEATURE_DISABLED_BY_DEFAULT}; |
51 | 51 |
52 // This class is used to make sure a specified surface isn't current, and upon | 52 // This class is used to make sure a specified surface isn't current, and upon |
53 // destruction it will make the surface current again if it had been before. | 53 // destruction it will make the surface current again if it had been before. |
54 class ScopedReleaseCurrent { | 54 class ScopedReleaseCurrent { |
55 public: | 55 public: |
56 explicit ScopedReleaseCurrent(gl::GLSurface* this_surface) { | 56 explicit ScopedReleaseCurrent(gl::GLSurface* this_surface) { |
57 gl::GLContext* current_context = gl::GLContext::GetCurrent(); | 57 gl::GLContext* current_context = gl::GLContext::GetCurrent(); |
58 bool was_current = | 58 bool was_current = |
59 current_context && current_context->IsCurrent(this_surface); | 59 current_context && current_context->IsCurrent(this_surface); |
60 if (was_current) { | 60 if (was_current) { |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { | 1061 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { |
1062 return child_window_.GetTaskRunnerForTesting(); | 1062 return child_window_.GetTaskRunnerForTesting(); |
1063 } | 1063 } |
1064 | 1064 |
1065 base::win::ScopedComPtr<IDXGISwapChain1> | 1065 base::win::ScopedComPtr<IDXGISwapChain1> |
1066 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { | 1066 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { |
1067 return layer_tree_->GetLayerSwapChainForTesting(index); | 1067 return layer_tree_->GetLayerSwapChainForTesting(index); |
1068 } | 1068 } |
1069 | 1069 |
1070 } // namespace gpu | 1070 } // namespace gpu |
OLD | NEW |