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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1639843002: Correct a small typo in WebGLRenderingContextBase::validateImageBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 6538 matching lines...) Expand 10 before | Expand all | Expand 10 after
6549 if (wouldTaintOrigin(video)) { 6549 if (wouldTaintOrigin(video)) {
6550 exceptionState.throwSecurityError("The video element contains cross-orig in data, and may not be loaded."); 6550 exceptionState.throwSecurityError("The video element contains cross-orig in data, and may not be loaded.");
6551 return false; 6551 return false;
6552 } 6552 }
6553 return true; 6553 return true;
6554 } 6554 }
6555 6555
6556 bool WebGLRenderingContextBase::validateImageBitmap(const char* functionName, Im ageBitmap* bitmap, ExceptionState& exceptionState) 6556 bool WebGLRenderingContextBase::validateImageBitmap(const char* functionName, Im ageBitmap* bitmap, ExceptionState& exceptionState)
6557 { 6557 {
6558 if (bitmap->isNeutered()) { 6558 if (bitmap->isNeutered()) {
6559 synthesizeGLError(GL_INVALID_VALUE, "texImage2D", "The source data has b een neutered."); 6559 synthesizeGLError(GL_INVALID_VALUE, functionName, "The source data has b een neutered.");
6560 return false; 6560 return false;
6561 } 6561 }
6562 if (!bitmap->originClean()) { 6562 if (!bitmap->originClean()) {
6563 exceptionState.throwSecurityError("The ImageBitmap contains cross-origin data, and may not be loaded."); 6563 exceptionState.throwSecurityError("The ImageBitmap contains cross-origin data, and may not be loaded.");
6564 return false; 6564 return false;
6565 } 6565 }
6566 return true; 6566 return true;
6567 } 6567 }
6568 6568
6569 bool WebGLRenderingContextBase::validateDrawArrays(const char* functionName, GLe num mode, GLint first, GLsizei count) 6569 bool WebGLRenderingContextBase::validateDrawArrays(const char* functionName, GLe num mode, GLint first, GLsizei count)
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
7000 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); 7000 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1);
7001 } 7001 }
7002 7002
7003 void WebGLRenderingContextBase::restoreUnpackParameters() 7003 void WebGLRenderingContextBase::restoreUnpackParameters()
7004 { 7004 {
7005 if (m_unpackAlignment != 1) 7005 if (m_unpackAlignment != 1)
7006 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 7006 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
7007 } 7007 }
7008 7008
7009 } // namespace blink 7009 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698