| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 void WebGLTexture::setTarget(GLenum target) | 50 void WebGLTexture::setTarget(GLenum target) |
| 51 { | 51 { |
| 52 if (!object()) | 52 if (!object()) |
| 53 return; | 53 return; |
| 54 // Target is finalized the first time bindTexture() is called. | 54 // Target is finalized the first time bindTexture() is called. |
| 55 if (m_target) | 55 if (m_target) |
| 56 return; | 56 return; |
| 57 m_target = target; | 57 m_target = target; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void WebGLTexture::deleteObjectImpl(WebGraphicsContext3D* context3d) | 60 void WebGLTexture::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2:
:GLES2Interface* gl) |
| 61 { | 61 { |
| 62 context3d->deleteTexture(m_object); | 62 context3d->deleteTexture(m_object); |
| 63 m_object = 0; | 63 m_object = 0; |
| 64 } | 64 } |
| 65 | 65 |
| 66 int WebGLTexture::mapTargetToIndex(GLenum target) const | 66 int WebGLTexture::mapTargetToIndex(GLenum target) const |
| 67 { | 67 { |
| 68 if (m_target == GL_TEXTURE_2D) { | 68 if (m_target == GL_TEXTURE_2D) { |
| 69 if (target == GL_TEXTURE_2D) | 69 if (target == GL_TEXTURE_2D) |
| 70 return 0; | 70 return 0; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 if (x) { | 107 if (x) { |
| 108 value = x; | 108 value = x; |
| 109 log += shift; | 109 log += shift; |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 ASSERT(value == 1); | 112 ASSERT(value == 1); |
| 113 return log + 1; | 113 return log + 1; |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| OLD | NEW |