OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include "gpu/command_buffer/service/feature_info.h" | 7 #include "gpu/command_buffer/service/feature_info.h" |
8 #include "gpu/command_buffer/service/gl_utils.h" | 8 #include "gpu/command_buffer/service/gl_utils.h" |
9 #include "ui/gfx/gl/gl_implementation.h" | 9 #include "ui/gfx/gl/gl_implementation.h" |
10 #include "ui/gfx/gl/gl_surface.h" | 10 #include "ui/gfx/gl/gl_surface.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 feature_flags_.enable_texture_float_linear = enable_texture_float_linear; | 357 feature_flags_.enable_texture_float_linear = enable_texture_float_linear; |
358 feature_flags_.enable_texture_half_float_linear = | 358 feature_flags_.enable_texture_half_float_linear = |
359 enable_texture_half_float_linear; | 359 enable_texture_half_float_linear; |
360 feature_flags_.npot_ok = npot_ok; | 360 feature_flags_.npot_ok = npot_ok; |
361 | 361 |
362 if (ext.Desire("GL_CHROMIUM_post_sub_buffer") && | 362 if (ext.Desire("GL_CHROMIUM_post_sub_buffer") && |
363 gfx::GLSurface::GetCurrent() && | 363 gfx::GLSurface::GetCurrent() && |
364 gfx::GLSurface::GetCurrent()->SupportsPostSubBuffer()) { | 364 gfx::GLSurface::GetCurrent()->SupportsPostSubBuffer()) { |
365 AddExtensionString("GL_CHROMIUM_post_sub_buffer"); | 365 AddExtensionString("GL_CHROMIUM_post_sub_buffer"); |
366 } | 366 } |
| 367 |
| 368 if (ext.Desire("GL_ANGLE_pack_reverse_row_order") && |
| 369 ext.Have("GL_ANGLE_pack_reverse_row_order")) { |
| 370 AddExtensionString("GL_ANGLE_pack_reverse_row_order"); |
| 371 feature_flags_.angle_pack_reverse_row_order = true; |
| 372 validators_.pixel_store.AddValue(GL_PACK_REVERSE_ROW_ORDER_ANGLE); |
| 373 validators_.g_l_state.AddValue(GL_PACK_REVERSE_ROW_ORDER_ANGLE); |
| 374 } |
367 } | 375 } |
368 | 376 |
369 void FeatureInfo::AddExtensionString(const std::string& str) { | 377 void FeatureInfo::AddExtensionString(const std::string& str) { |
370 if (extensions_.find(str) == std::string::npos) { | 378 if (extensions_.find(str) == std::string::npos) { |
371 extensions_ += (extensions_.empty() ? "" : " ") + str; | 379 extensions_ += (extensions_.empty() ? "" : " ") + str; |
372 } | 380 } |
373 } | 381 } |
374 | 382 |
375 } // namespace gles2 | 383 } // namespace gles2 |
376 } // namespace gpu | 384 } // namespace gpu |
OLD | NEW |