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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 base::Lock* TestInProcessContextProvider::GetLock() { | 105 base::Lock* TestInProcessContextProvider::GetLock() { |
106 return &context_lock_; | 106 return &context_lock_; |
107 } | 107 } |
108 | 108 |
109 gpu::Capabilities TestInProcessContextProvider::ContextCapabilities() { | 109 gpu::Capabilities TestInProcessContextProvider::ContextCapabilities() { |
110 gpu::Capabilities capabilities; | 110 gpu::Capabilities capabilities; |
111 capabilities.texture_rectangle = true; | 111 capabilities.texture_rectangle = true; |
112 capabilities.sync_query = true; | 112 capabilities.sync_query = true; |
| 113 capabilities.texture_norm16 = true; |
113 switch (viz::PlatformColor::Format()) { | 114 switch (viz::PlatformColor::Format()) { |
114 case viz::PlatformColor::SOURCE_FORMAT_RGBA8: | 115 case viz::PlatformColor::SOURCE_FORMAT_RGBA8: |
115 capabilities.texture_format_bgra8888 = false; | 116 capabilities.texture_format_bgra8888 = false; |
116 break; | 117 break; |
117 case viz::PlatformColor::SOURCE_FORMAT_BGRA8: | 118 case viz::PlatformColor::SOURCE_FORMAT_BGRA8: |
118 capabilities.texture_format_bgra8888 = true; | 119 capabilities.texture_format_bgra8888 = true; |
119 break; | 120 break; |
120 } | 121 } |
121 return capabilities; | 122 return capabilities; |
122 } | 123 } |
123 | 124 |
124 void TestInProcessContextProvider::SetLostContextCallback( | 125 void TestInProcessContextProvider::SetLostContextCallback( |
125 const LostContextCallback& lost_context_callback) {} | 126 const LostContextCallback& lost_context_callback) {} |
126 | 127 |
127 } // namespace cc | 128 } // namespace cc |
OLD | NEW |