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

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

Issue 2157953002: Change filter quality when scaling-down in drawImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 4087 matching lines...) Expand 10 before | Expand all | Expand 10 after
4098 synthesizeGLError(GL_OUT_OF_MEMORY, functionName, "out of memory"); 4098 synthesizeGLError(GL_OUT_OF_MEMORY, functionName, "out of memory");
4099 return nullptr; 4099 return nullptr;
4100 } 4100 }
4101 4101
4102 if (!image->currentFrameKnownToBeOpaque()) 4102 if (!image->currentFrameKnownToBeOpaque())
4103 buf->canvas()->clear(SK_ColorTRANSPARENT); 4103 buf->canvas()->clear(SK_ColorTRANSPARENT);
4104 4104
4105 IntRect srcRect(IntPoint(), image->size()); 4105 IntRect srcRect(IntPoint(), image->size());
4106 IntRect destRect(0, 0, size.width(), size.height()); 4106 IntRect destRect(0, 0, size.width(), size.height());
4107 SkPaint paint; 4107 SkPaint paint;
4108 image->draw(buf->canvas(), paint, destRect, srcRect, DoNotRespectImageOrient ation, Image::DoNotClampImageToSourceRect); 4108 image->draw(buf->canvas(), paint, destRect, srcRect, true, DoNotRespectImage Orientation, Image::DoNotClampImageToSourceRect);
4109 return buf->newImageSnapshot(PreferNoAcceleration, SnapshotReasonWebGLDrawIm ageIntoBuffer); 4109 return buf->newImageSnapshot(PreferNoAcceleration, SnapshotReasonWebGLDrawIm ageIntoBuffer);
4110 } 4110 }
4111 4111
4112 WebGLTexture* WebGLRenderingContextBase::validateTexImageBinding(const char* fun cName, TexImageFunctionID functionID, GLenum target) 4112 WebGLTexture* WebGLRenderingContextBase::validateTexImageBinding(const char* fun cName, TexImageFunctionID functionID, GLenum target)
4113 { 4113 {
4114 return validateTexture2DBinding(funcName, target); 4114 return validateTexture2DBinding(funcName, target);
4115 } 4115 }
4116 4116
4117 const char* WebGLRenderingContextBase::getTexImageFunctionName(TexImageFunctionI D funcName) 4117 const char* WebGLRenderingContextBase::getTexImageFunctionName(TexImageFunctionI D funcName)
4118 { 4118 {
(...skipping 2372 matching lines...) Expand 10 before | Expand all | Expand 10 after
6491 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); 6491 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
6492 } 6492 }
6493 6493
6494 void WebGLRenderingContextBase::restoreUnpackParameters() 6494 void WebGLRenderingContextBase::restoreUnpackParameters()
6495 { 6495 {
6496 if (m_unpackAlignment != 1) 6496 if (m_unpackAlignment != 1)
6497 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6497 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6498 } 6498 }
6499 6499
6500 } // namespace blink 6500 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698