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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index abb24dba49c2d22d4ce370972b4b0f5c6886754d..f13fbbecb60be5057691814359d630448021d262 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -3920,7 +3920,7 @@ PassRefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(PassRefPtr<Imag
if (!image->currentFrameKnownToBeOpaque())
buf->canvas()->clear(SK_ColorTRANSPARENT);
- IntRect srcRect(IntPoint(), image->size());
+ IntRect srcRect(IntPoint(), image->defaultConcreteObjectSize());
IntRect destRect(0, 0, size.width(), size.height());
SkPaint paint;
image->draw(buf->canvas(), paint, destRect, srcRect, DoNotRespectImageOrientation, Image::DoNotClampImageToSourceRect);
@@ -4007,7 +4007,7 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLint int
if (imageForRender && imageForRender->isSVGImage())
imageForRender = drawImageIntoBuffer(imageForRender.release(), image->width(), image->height(), "texImage2D");
- if (!imageForRender || !validateTexFunc("texImage2D", TexImage, SourceHTMLImageElement, target, level, internalformat, imageForRender->width(), imageForRender->height(), 1, 0, format, type, 0, 0, 0))
+ if (!imageForRender || !validateTexFunc("texImage2D", TexImage, SourceHTMLImageElement, target, level, internalformat, imageForRender->defaultConcreteObjectSizeWidth(), imageForRender->defaultConcreteObjectSizeHeight(), 1, 0, format, type, 0, 0, 0))
return;
if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) {
@@ -4380,7 +4380,7 @@ void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint
if (imageForRender && imageForRender->isSVGImage())
imageForRender = drawImageIntoBuffer(imageForRender.release(), image->width(), image->height(), "texSubImage2D");
- if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage, SourceHTMLImageElement, target, level, 0, imageForRender->width(), imageForRender->height(), 1, 0, format, type, xoffset, yoffset, 0))
+ if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage, SourceHTMLImageElement, target, level, 0, imageForRender->defaultConcreteObjectSizeWidth(), imageForRender->defaultConcreteObjectSizeHeight(), 1, 0, format, type, xoffset, yoffset, 0))
return;
if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) {
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp ('k') | third_party/WebKit/Source/platform/Cursor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698