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

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

Issue 1147123006: Upgrade WebGLImageConversion to support WebGL 2 formats and types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/WebGLImageConversion.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 1525
1526 if (!validateCompressedTexSubDimensions("compressedTexSubImage2D", target, l evel, xoffset, yoffset, width, height, format, tex)) 1526 if (!validateCompressedTexSubDimensions("compressedTexSubImage2D", target, l evel, xoffset, yoffset, width, height, format, tex))
1527 return; 1527 return;
1528 1528
1529 webContext()->compressedTexSubImage2D(target, level, xoffset, yoffset, 1529 webContext()->compressedTexSubImage2D(target, level, xoffset, yoffset,
1530 width, height, format, data->byteLength(), data->baseAddress()); 1530 width, height, format, data->byteLength(), data->baseAddress());
1531 } 1531 }
1532 1532
1533 bool WebGLRenderingContextBase::validateSettableTexFormat(const char* functionNa me, GLenum format) 1533 bool WebGLRenderingContextBase::validateSettableTexFormat(const char* functionNa me, GLenum format)
1534 { 1534 {
1535 if (WebGLImageConversion::getClearBitsByFormat(format) & (GL_DEPTH_BUFFER_BI T | GL_STENCIL_BUFFER_BIT)) { 1535 if (WebGLImageConversion::getChannelBitsByFormat(format) & WebGLImageConvers ion::ChannelDepthStencil) {
1536 synthesizeGLError(GL_INVALID_OPERATION, functionName, "format can not be set, only rendered to"); 1536 synthesizeGLError(GL_INVALID_OPERATION, functionName, "format can not be set, only rendered to");
1537 return false; 1537 return false;
1538 } 1538 }
1539 return true; 1539 return true;
1540 } 1540 }
1541 1541
1542 void WebGLRenderingContextBase::copyTexImage2D(GLenum target, GLint level, GLenu m internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) 1542 void WebGLRenderingContextBase::copyTexImage2D(GLenum target, GLint level, GLenu m internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
1543 { 1543 {
1544 if (isContextLost()) 1544 if (isContextLost())
1545 return; 1545 return;
(...skipping 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after
6211 6211
6212 return totalBytesPerPixel; 6212 return totalBytesPerPixel;
6213 } 6213 }
6214 6214
6215 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const 6215 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const
6216 { 6216 {
6217 return m_drawingBuffer.get(); 6217 return m_drawingBuffer.get();
6218 } 6218 }
6219 6219
6220 } // namespace blink 6220 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/WebGLImageConversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698