Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

Issue 167893008: WebGL: Remove some unused members in WebGLRenderingContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4424 matching lines...) Expand 10 before | Expand all | Expand 10 after
4435 4435
4436 GLenum WebGLRenderingContext::boundFramebufferColorFormat() 4436 GLenum WebGLRenderingContext::boundFramebufferColorFormat()
4437 { 4437 {
4438 if (m_framebufferBinding && m_framebufferBinding->object()) 4438 if (m_framebufferBinding && m_framebufferBinding->object())
4439 return m_framebufferBinding->colorBufferFormat(); 4439 return m_framebufferBinding->colorBufferFormat();
4440 if (m_requestedAttributes->alpha()) 4440 if (m_requestedAttributes->alpha())
4441 return GL_RGBA; 4441 return GL_RGBA;
4442 return GL_RGB; 4442 return GL_RGB;
4443 } 4443 }
4444 4444
4445 int WebGLRenderingContext::boundFramebufferWidth()
4446 {
4447 if (m_framebufferBinding && m_framebufferBinding->object())
4448 return m_framebufferBinding->colorBufferWidth();
4449 return m_drawingBuffer->size().width();
4450 }
4451
4452 int WebGLRenderingContext::boundFramebufferHeight()
4453 {
4454 if (m_framebufferBinding && m_framebufferBinding->object())
4455 return m_framebufferBinding->colorBufferHeight();
4456 return m_drawingBuffer->size().height();
4457 }
4458
4459 WebGLTexture* WebGLRenderingContext::validateTextureBinding(const char* function Name, GLenum target, bool useSixEnumsForCubeMap) 4445 WebGLTexture* WebGLRenderingContext::validateTextureBinding(const char* function Name, GLenum target, bool useSixEnumsForCubeMap)
4460 { 4446 {
4461 WebGLTexture* tex = 0; 4447 WebGLTexture* tex = 0;
4462 switch (target) { 4448 switch (target) {
4463 case GL_TEXTURE_2D: 4449 case GL_TEXTURE_2D:
4464 tex = m_textureUnits[m_activeTextureUnit].m_texture2DBinding.get(); 4450 tex = m_textureUnits[m_activeTextureUnit].m_texture2DBinding.get();
4465 break; 4451 break;
4466 case GL_TEXTURE_CUBE_MAP_POSITIVE_X: 4452 case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
4467 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: 4453 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
4468 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: 4454 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
5622 if (m_textureUnits[i].m_texture2DBinding 5608 if (m_textureUnits[i].m_texture2DBinding
5623 || m_textureUnits[i].m_textureCubeMapBinding) { 5609 || m_textureUnits[i].m_textureCubeMapBinding) {
5624 m_onePlusMaxNonDefaultTextureUnit = i + 1; 5610 m_onePlusMaxNonDefaultTextureUnit = i + 1;
5625 return; 5611 return;
5626 } 5612 }
5627 } 5613 }
5628 m_onePlusMaxNonDefaultTextureUnit = 0; 5614 m_onePlusMaxNonDefaultTextureUnit = 0;
5629 } 5615 }
5630 5616
5631 } // namespace WebCore 5617 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698