OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/test/test_in_process_context_provider.h" | 5 #include "cc/test/test_in_process_context_provider.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 | 103 |
104 base::Lock* TestInProcessContextProvider::GetLock() { | 104 base::Lock* TestInProcessContextProvider::GetLock() { |
105 return &context_lock_; | 105 return &context_lock_; |
106 } | 106 } |
107 | 107 |
108 gpu::Capabilities TestInProcessContextProvider::ContextCapabilities() { | 108 gpu::Capabilities TestInProcessContextProvider::ContextCapabilities() { |
109 gpu::Capabilities capabilities; | 109 gpu::Capabilities capabilities; |
110 capabilities.texture_rectangle = true; | 110 capabilities.texture_rectangle = true; |
111 capabilities.sync_query = true; | 111 capabilities.sync_query = true; |
112 capabilities.disable_one_component_textures = | |
113 capabilities_disable_one_component_textures_; | |
114 capabilities.texture_half_float_linear = | |
115 capabilities_texture_half_float_linear_; | |
116 switch (PlatformColor::Format()) { | 112 switch (PlatformColor::Format()) { |
117 case PlatformColor::SOURCE_FORMAT_RGBA8: | 113 case PlatformColor::SOURCE_FORMAT_RGBA8: |
118 capabilities.texture_format_bgra8888 = false; | 114 capabilities.texture_format_bgra8888 = false; |
119 break; | 115 break; |
120 case PlatformColor::SOURCE_FORMAT_BGRA8: | 116 case PlatformColor::SOURCE_FORMAT_BGRA8: |
121 capabilities.texture_format_bgra8888 = true; | 117 capabilities.texture_format_bgra8888 = true; |
122 break; | 118 break; |
123 } | 119 } |
124 return capabilities; | 120 return capabilities; |
125 } | 121 } |
126 | 122 |
127 void TestInProcessContextProvider::SetLostContextCallback( | 123 void TestInProcessContextProvider::SetLostContextCallback( |
128 const LostContextCallback& lost_context_callback) {} | 124 const LostContextCallback& lost_context_callback) {} |
129 | 125 |
130 } // namespace cc | 126 } // namespace cc |
OLD | NEW |