OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 | 705 |
706 switch (value) { | 706 switch (value) { |
707 case GR_GL_BUFFER_MAPPED: | 707 case GR_GL_BUFFER_MAPPED: |
708 *params = GR_GL_FALSE; | 708 *params = GR_GL_FALSE; |
709 if (buffer) | 709 if (buffer) |
710 *params = buffer->getMapped() ? GR_GL_TRUE : GR_GL_FALSE; | 710 *params = buffer->getMapped() ? GR_GL_TRUE : GR_GL_FALSE; |
711 break; | 711 break; |
712 case GR_GL_BUFFER_SIZE: | 712 case GR_GL_BUFFER_SIZE: |
713 *params = 0; | 713 *params = 0; |
714 if (buffer) | 714 if (buffer) |
715 *params = buffer->getSize(); | 715 *params = SkToInt(buffer->getSize()); |
716 break; | 716 break; |
717 case GR_GL_BUFFER_USAGE: | 717 case GR_GL_BUFFER_USAGE: |
718 *params = GR_GL_STATIC_DRAW; | 718 *params = GR_GL_STATIC_DRAW; |
719 if (buffer) | 719 if (buffer) |
720 *params = buffer->getUsage(); | 720 *params = buffer->getUsage(); |
721 break; | 721 break; |
722 default: | 722 default: |
723 GrCrash("Unexpected value to glGetBufferParamateriv"); | 723 GrCrash("Unexpected value to glGetBufferParamateriv"); |
724 break; | 724 break; |
725 } | 725 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 functions->fMapBuffer = debugGLMapBuffer; | 917 functions->fMapBuffer = debugGLMapBuffer; |
918 functions->fUnmapBuffer = debugGLUnmapBuffer; | 918 functions->fUnmapBuffer = debugGLUnmapBuffer; |
919 functions->fBindFragDataLocationIndexed = | 919 functions->fBindFragDataLocationIndexed = |
920 noOpGLBindFragDataLocationIndexed; | 920 noOpGLBindFragDataLocationIndexed; |
921 | 921 |
922 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio
ns->fGetStringi, | 922 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio
ns->fGetStringi, |
923 functions->fGetIntegerv); | 923 functions->fGetIntegerv); |
924 | 924 |
925 return interface; | 925 return interface; |
926 } | 926 } |
OLD | NEW |