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

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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 4002 matching lines...) Expand 10 before | Expand all | Expand 10 after
4013 void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLint int ernalformat, 4013 void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLint int ernalformat,
4014 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState) 4014 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState)
4015 { 4015 {
4016 if (isContextLost()) 4016 if (isContextLost())
4017 return; 4017 return;
4018 if (!validateHTMLImageElement("texImage2D", image, exceptionState)) 4018 if (!validateHTMLImageElement("texImage2D", image, exceptionState))
4019 return; 4019 return;
4020 if (!validateTexture2DBinding("texImage2D", target)) 4020 if (!validateTexture2DBinding("texImage2D", target))
4021 return; 4021 return;
4022 4022
4023 RefPtr<Image> imageForRender = image->cachedImage()->image(); 4023 RefPtr<Image> imageForRender = image->cachedImage()->getImage();
4024 if (imageForRender && imageForRender->isSVGImage()) 4024 if (imageForRender && imageForRender->isSVGImage())
4025 imageForRender = drawImageIntoBuffer(imageForRender.release(), image->wi dth(), image->height(), "texImage2D"); 4025 imageForRender = drawImageIntoBuffer(imageForRender.release(), image->wi dth(), image->height(), "texImage2D");
4026 4026
4027 if (!imageForRender || !validateTexFunc("texImage2D", TexImage, SourceHTMLIm ageElement, target, level, internalformat, imageForRender->width(), imageForRend er->height(), 1, 0, format, type, 0, 0, 0)) 4027 if (!imageForRender || !validateTexFunc("texImage2D", TexImage, SourceHTMLIm ageElement, target, level, internalformat, imageForRender->width(), imageForRend er->height(), 1, 0, format, type, 0, 0, 0))
4028 return; 4028 return;
4029 4029
4030 if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) { 4030 if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) {
4031 // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented. 4031 // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented.
4032 type = GL_FLOAT; 4032 type = GL_FLOAT;
4033 } 4033 }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
4387 void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 4387 void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
4388 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState) 4388 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState)
4389 { 4389 {
4390 if (isContextLost()) 4390 if (isContextLost())
4391 return; 4391 return;
4392 if (!validateHTMLImageElement("texSubImage2D", image, exceptionState)) 4392 if (!validateHTMLImageElement("texSubImage2D", image, exceptionState))
4393 return; 4393 return;
4394 if (!validateTexture2DBinding("texSubImage2D", target)) 4394 if (!validateTexture2DBinding("texSubImage2D", target))
4395 return; 4395 return;
4396 4396
4397 RefPtr<Image> imageForRender = image->cachedImage()->image(); 4397 RefPtr<Image> imageForRender = image->cachedImage()->getImage();
4398 if (imageForRender && imageForRender->isSVGImage()) 4398 if (imageForRender && imageForRender->isSVGImage())
4399 imageForRender = drawImageIntoBuffer(imageForRender.release(), image->wi dth(), image->height(), "texSubImage2D"); 4399 imageForRender = drawImageIntoBuffer(imageForRender.release(), image->wi dth(), image->height(), "texSubImage2D");
4400 4400
4401 if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage, Source HTMLImageElement, target, level, 0, imageForRender->width(), imageForRender->hei ght(), 1, 0, format, type, xoffset, yoffset, 0)) 4401 if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage, Source HTMLImageElement, target, level, 0, imageForRender->width(), imageForRender->hei ght(), 1, 0, format, type, xoffset, yoffset, 0))
4402 return; 4402 return;
4403 4403
4404 if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) { 4404 if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) {
4405 // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented. 4405 // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented.
4406 type = GL_FLOAT; 4406 type = GL_FLOAT;
4407 } 4407 }
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
6285 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); 6285 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1);
6286 } 6286 }
6287 6287
6288 void WebGLRenderingContextBase::restoreUnpackParameters() 6288 void WebGLRenderingContextBase::restoreUnpackParameters()
6289 { 6289 {
6290 if (m_unpackAlignment != 1) 6290 if (m_unpackAlignment != 1)
6291 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6291 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6292 } 6292 }
6293 6293
6294 } // namespace blink 6294 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp ('k') | third_party/WebKit/Source/platform/Cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698