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

Unified Diff: Source/platform/graphics/GraphicsContext3D.cpp

Issue 127163003: Completely removed the Extensions3D class (Take 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/GraphicsContext3D.h ('k') | Source/platform/graphics/GraphicsTypes3D.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext3D.cpp
diff --git a/Source/platform/graphics/GraphicsContext3D.cpp b/Source/platform/graphics/GraphicsContext3D.cpp
index c6d52ba3ddbf1f7b78c395ba18ebd557bdb374bf..b5ceca36f7675308f2bfbc06636313d3a2e76210 100644
--- a/Source/platform/graphics/GraphicsContext3D.cpp
+++ b/Source/platform/graphics/GraphicsContext3D.cpp
@@ -466,13 +466,6 @@ DELEGATE_TO_WEBCONTEXT_1(deleteTexture, Platform3DObject)
DELEGATE_TO_WEBCONTEXT_1(synthesizeGLError, GLenum)
-Extensions3D* GraphicsContext3D::extensions()
-{
- if (!m_extensions)
- m_extensions = adoptPtr(new Extensions3D(this));
- return m_extensions.get();
-}
-
bool GraphicsContext3D::texImage2DResourceSafe(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLint unpackAlignment)
{
ASSERT(unpackAlignment == 1 || unpackAlignment == 2 || unpackAlignment == 4 || unpackAlignment == 8);
@@ -496,7 +489,7 @@ bool GraphicsContext3D::computeFormatAndTypeParameters(GLenum format, GLenum typ
*componentsPerPixel = 3;
break;
case GL_RGBA:
- case Extensions3D::BGRA_EXT: // GL_EXT_texture_format_BGRA8888
+ case GL_BGRA_EXT: // GL_EXT_texture_format_BGRA8888
*componentsPerPixel = 4;
break;
default:
@@ -800,6 +793,17 @@ bool GraphicsContext3D::isExtensionEnabled(const String& name)
return m_enabledExtensions.contains(mappedName);
}
+bool GraphicsContext3D::canUseCopyTextureCHROMIUM(GLenum destFormat, GLenum destType, GLint level)
+{
+ // FIXME: restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lifted when
+ // WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional.
+ if ((destFormat == GL_RGB || destFormat == GL_RGBA)
+ && destType == GL_UNSIGNED_BYTE
+ && !level)
+ return true;
+ return false;
+}
+
void GraphicsContext3D::flipVertically(uint8_t* framebuffer, int width, int height)
{
m_scanline.resize(width * 4);
« no previous file with comments | « Source/platform/graphics/GraphicsContext3D.h ('k') | Source/platform/graphics/GraphicsTypes3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698