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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master Created 5 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 | Annotate | Revision Log
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 3624 matching lines...) Expand 10 before | Expand all | Expand 10 after
3635 if (m_unpackAlignment != 1) 3635 if (m_unpackAlignment != 1)
3636 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 3636 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
3637 } 3637 }
3638 3638
3639 void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in ternalformat, 3639 void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in ternalformat,
3640 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState) 3640 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState)
3641 { 3641 {
3642 if (isContextLost() || !validateHTMLImageElement("texImage2D", image, except ionState)) 3642 if (isContextLost() || !validateHTMLImageElement("texImage2D", image, except ionState))
3643 return; 3643 return;
3644 3644
3645 RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image- >renderer()); 3645 RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image- >layoutObject());
3646 if (imageForRender->isSVGImage()) 3646 if (imageForRender->isSVGImage())
3647 imageForRender = drawImageIntoBuffer(imageForRender.get(), image->width( ), image->height(), "texImage2D"); 3647 imageForRender = drawImageIntoBuffer(imageForRender.get(), image->width( ), image->height(), "texImage2D");
3648 3648
3649 if (!imageForRender || !validateTexFunc("texImage2D", NotTexSubImage2D, Sour ceHTMLImageElement, target, level, internalformat, imageForRender->width(), imag eForRender->height(), 0, format, type, 0, 0)) 3649 if (!imageForRender || !validateTexFunc("texImage2D", NotTexSubImage2D, Sour ceHTMLImageElement, target, level, internalformat, imageForRender->width(), imag eForRender->height(), 0, format, type, 0, 0))
3650 return; 3650 return;
3651 3651
3652 texImage2DImpl(target, level, internalformat, format, type, imageForRender.g et(), WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlph a, exceptionState); 3652 texImage2DImpl(target, level, internalformat, format, type, imageForRender.g et(), WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlph a, exceptionState);
3653 } 3653 }
3654 3654
3655 void WebGLRenderingContextBase::texImage2DCanvasByGPU(TexImageFunctionType funct ionType, WebGLTexture* texture, GLenum target, 3655 void WebGLRenderingContextBase::texImage2DCanvasByGPU(TexImageFunctionType funct ionType, WebGLTexture* texture, GLenum target,
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
3943 if (m_unpackAlignment != 1) 3943 if (m_unpackAlignment != 1)
3944 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 3944 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
3945 } 3945 }
3946 3946
3947 void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 3947 void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
3948 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState) 3948 GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& excepti onState)
3949 { 3949 {
3950 if (isContextLost() || !validateHTMLImageElement("texSubImage2D", image, exc eptionState)) 3950 if (isContextLost() || !validateHTMLImageElement("texSubImage2D", image, exc eptionState))
3951 return; 3951 return;
3952 3952
3953 RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image- >renderer()); 3953 RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image- >layoutObject());
3954 if (imageForRender->isSVGImage()) 3954 if (imageForRender->isSVGImage())
3955 imageForRender = drawImageIntoBuffer(imageForRender.get(), image->width( ), image->height(), "texSubImage2D"); 3955 imageForRender = drawImageIntoBuffer(imageForRender.get(), image->width( ), image->height(), "texSubImage2D");
3956 3956
3957 if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage2D, Sour ceHTMLImageElement, target, level, format, imageForRender->width(), imageForRend er->height(), 0, format, type, xoffset, yoffset)) 3957 if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage2D, Sour ceHTMLImageElement, target, level, format, imageForRender->width(), imageForRend er->height(), 0, format, type, xoffset, yoffset))
3958 return; 3958 return;
3959 3959
3960 texSubImage2DImpl(target, level, xoffset, yoffset, format, type, imageForRen der.get(), WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultipl yAlpha, exceptionState); 3960 texSubImage2DImpl(target, level, xoffset, yoffset, format, type, imageForRen der.get(), WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultipl yAlpha, exceptionState);
3961 } 3961 }
3962 3962
3963 void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 3963 void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after
6015 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0; 6015 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0;
6016 } 6016 }
6017 #else 6017 #else
6018 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const 6018 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const
6019 { 6019 {
6020 return m_drawingBuffer.get(); 6020 return m_drawingBuffer.get();
6021 } 6021 }
6022 #endif 6022 #endif
6023 6023
6024 } // namespace blink 6024 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698