Merge "Don't apply filter in readback, when there is no scaling" into pi-dev
am: cea247e135
Change-Id: Ibfcc41e052376d159886410d11130bb89ade168d
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include "DeviceInfo.h"
|
#include "DeviceInfo.h"
|
||||||
#include "Matrix.h"
|
#include "Matrix.h"
|
||||||
#include "Properties.h"
|
#include "Properties.h"
|
||||||
|
#include "utils/MathUtils.h"
|
||||||
|
|
||||||
using namespace android::uirenderer::renderthread;
|
using namespace android::uirenderer::renderthread;
|
||||||
|
|
||||||
@@ -116,9 +117,9 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4
|
|||||||
paint.setBlendMode(SkBlendMode::kSrc);
|
paint.setBlendMode(SkBlendMode::kSrc);
|
||||||
// Apply a filter, which is matching OpenGL pipeline readback behaviour. Filter usage
|
// Apply a filter, which is matching OpenGL pipeline readback behaviour. Filter usage
|
||||||
// is codified by tests using golden images like DecodeAccuracyTest.
|
// is codified by tests using golden images like DecodeAccuracyTest.
|
||||||
if (skiaSrcRect.width() != bitmap->width() ||
|
bool disableFilter = MathUtils::areEqual(skiaSrcRect.width(), skiaDestRect.width())
|
||||||
skiaSrcRect.height() != bitmap->height()) {
|
&& MathUtils::areEqual(skiaSrcRect.height(), skiaDestRect.height());
|
||||||
// TODO: apply filter always, but check if tests will be fine
|
if (!disableFilter) {
|
||||||
paint.setFilterQuality(kLow_SkFilterQuality);
|
paint.setFilterQuality(kLow_SkFilterQuality);
|
||||||
}
|
}
|
||||||
scaledSurface->getCanvas()->concat(textureMatrix);
|
scaledSurface->getCanvas()->concat(textureMatrix);
|
||||||
|
|||||||
Reference in New Issue
Block a user