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 | 5 |
6 #include "ui/gfx/gl/gl_bindings_skia_in_process.h" | 6 #include "ui/gfx/gl/gl_bindings_skia_in_process.h" |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/gfx/gl/gl_bindings.h" | 9 #include "ui/gfx/gl/gl_bindings.h" |
10 #include "ui/gfx/gl/gl_implementation.h" | 10 #include "ui/gfx/gl/gl_implementation.h" |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 | 436 |
437 namespace gfx { | 437 namespace gfx { |
438 | 438 |
439 void BindSkiaToInProcessGL() { | 439 void BindSkiaToInProcessGL() { |
440 static bool host_StubGL_installed = false; | 440 static bool host_StubGL_installed = false; |
441 if (!host_StubGL_installed) { | 441 if (!host_StubGL_installed) { |
442 GrGLBinding binding; | 442 GrGLBinding binding; |
443 switch (gfx::GetGLImplementation()) { | 443 switch (gfx::GetGLImplementation()) { |
444 case gfx::kGLImplementationNone: | 444 case gfx::kGLImplementationNone: |
445 NOTREACHED(); | 445 NOTREACHED(); |
446 break; | 446 return; |
447 case gfx::kGLImplementationDesktopGL: | 447 case gfx::kGLImplementationDesktopGL: |
448 binding = kDesktop_GrGLBinding; | 448 binding = kDesktop_GrGLBinding; |
449 break; | 449 break; |
450 case gfx::kGLImplementationOSMesaGL: | 450 case gfx::kGLImplementationOSMesaGL: |
451 binding = kDesktop_GrGLBinding; | 451 binding = kDesktop_GrGLBinding; |
452 break; | 452 break; |
453 case gfx::kGLImplementationEGLGLES2: | 453 case gfx::kGLImplementationEGLGLES2: |
454 binding = kES2_GrGLBinding; | 454 binding = kES2_GrGLBinding; |
455 break; | 455 break; |
456 case gfx::kGLImplementationMockGL: | 456 case gfx::kGLImplementationMockGL: |
457 NOTREACHED(); | 457 NOTREACHED(); |
458 break; | 458 return; |
459 } | 459 } |
460 | 460 |
461 static GrGLInterface host_gl_interface = { | 461 static GrGLInterface host_gl_interface = { |
462 binding, | 462 binding, |
463 | 463 |
464 kProbe_GrGLCapability, // NPOTRenderTargetSupport | 464 kProbe_GrGLCapability, // NPOTRenderTargetSupport |
465 kProbe_GrGLCapability, // MinRenderTargetHeight | 465 kProbe_GrGLCapability, // MinRenderTargetHeight |
466 kProbe_GrGLCapability, // MinRenderTargetWidth | 466 kProbe_GrGLCapability, // MinRenderTargetWidth |
467 | 467 |
468 StubGLActiveTexture, | 468 StubGLActiveTexture, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 NULL, // glBindFragDataLocationIndexed | 574 NULL, // glBindFragDataLocationIndexed |
575 GrGLInterface::kStaticInitEndGuard, | 575 GrGLInterface::kStaticInitEndGuard, |
576 }; | 576 }; |
577 GrGLSetGLInterface(&host_gl_interface); | 577 GrGLSetGLInterface(&host_gl_interface); |
578 host_StubGL_installed = true; | 578 host_StubGL_installed = true; |
579 } | 579 } |
580 } | 580 } |
581 | 581 |
582 } // namespace gfx | 582 } // namespace gfx |
583 | 583 |
OLD | NEW |