| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void WebGLTexture::setTarget(GLenum target) | 53 void WebGLTexture::setTarget(GLenum target) |
| 54 { | 54 { |
| 55 if (!object()) | 55 if (!object()) |
| 56 return; | 56 return; |
| 57 // Target is finalized the first time bindTexture() is called. | 57 // Target is finalized the first time bindTexture() is called. |
| 58 if (m_target) | 58 if (m_target) |
| 59 return; | 59 return; |
| 60 m_target = target; | 60 m_target = target; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void WebGLTexture::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2:
:GLES2Interface* gl) | 63 void WebGLTexture::deleteObjectImpl(gpu::gles2::GLES2Interface* gl) |
| 64 { | 64 { |
| 65 gl->DeleteTextures(1, &m_object); | 65 gl->DeleteTextures(1, &m_object); |
| 66 m_object = 0; | 66 m_object = 0; |
| 67 } | 67 } |
| 68 | 68 |
| 69 int WebGLTexture::mapTargetToIndex(GLenum target) const | 69 int WebGLTexture::mapTargetToIndex(GLenum target) const |
| 70 { | 70 { |
| 71 if (m_target == GL_TEXTURE_2D) { | 71 if (m_target == GL_TEXTURE_2D) { |
| 72 if (target == GL_TEXTURE_2D) | 72 if (target == GL_TEXTURE_2D) |
| 73 return 0; | 73 return 0; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 if (x) { | 110 if (x) { |
| 111 value = x; | 111 value = x; |
| 112 log += shift; | 112 log += shift; |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 ASSERT(value == 1); | 115 ASSERT(value == 1); |
| 116 return log + 1; | 116 return log + 1; |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace blink | 119 } // namespace blink |
| OLD | NEW |