| 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 23 matching lines...) Expand all Loading... |
| 34 DEFINE_WRAPPERTYPEINFO(); | 34 DEFINE_WRAPPERTYPEINFO(); |
| 35 public: | 35 public: |
| 36 ~WebGLTexture() override; | 36 ~WebGLTexture() override; |
| 37 | 37 |
| 38 static WebGLTexture* create(WebGLRenderingContextBase*); | 38 static WebGLTexture* create(WebGLRenderingContextBase*); |
| 39 | 39 |
| 40 void setTarget(GLenum); | 40 void setTarget(GLenum); |
| 41 | 41 |
| 42 GLenum getTarget() const { return m_target; } | 42 GLenum getTarget() const { return m_target; } |
| 43 | 43 |
| 44 void setColorFormat(GLenum); |
| 45 |
| 46 GLenum getColorFormat() const { return m_colorFormat; } |
| 47 |
| 44 static GLenum getValidFormatForInternalFormat(GLenum); | 48 static GLenum getValidFormatForInternalFormat(GLenum); |
| 45 | 49 |
| 46 bool hasEverBeenBound() const { return object() && m_target; } | 50 bool hasEverBeenBound() const { return object() && m_target; } |
| 47 | 51 |
| 48 static GLint computeLevelCount(GLsizei width, GLsizei height, GLsizei depth)
; | 52 static GLint computeLevelCount(GLsizei width, GLsizei height, GLsizei depth)
; |
| 49 | 53 |
| 50 private: | 54 private: |
| 51 explicit WebGLTexture(WebGLRenderingContextBase*); | 55 explicit WebGLTexture(WebGLRenderingContextBase*); |
| 52 | 56 |
| 53 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; | 57 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; |
| 54 | 58 |
| 55 bool isTexture() const override { return true; } | 59 bool isTexture() const override { return true; } |
| 56 | 60 |
| 57 int mapTargetToIndex(GLenum) const; | 61 int mapTargetToIndex(GLenum) const; |
| 58 | 62 |
| 63 GLenum m_colorFormat; |
| 59 GLenum m_target; | 64 GLenum m_target; |
| 60 }; | 65 }; |
| 61 | 66 |
| 62 } // namespace blink | 67 } // namespace blink |
| 63 | 68 |
| 64 #endif // WebGLTexture_h | 69 #endif // WebGLTexture_h |
| OLD | NEW |