diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/colorconversion/SoftwareRenderer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/colorconversion/SoftwareRenderer.cpp b/media/libstagefright/colorconversion/SoftwareRenderer.cpp index 59af12a..2a861d7 100644 --- a/media/libstagefright/colorconversion/SoftwareRenderer.cpp +++ b/media/libstagefright/colorconversion/SoftwareRenderer.cpp @@ -33,6 +33,11 @@ static bool runningInEmulator() { return (property_get("ro.kernel.qemu", prop, NULL) > 0); } +static bool needsSoftwareRendering() { + char prop[PROPERTY_VALUE_MAX]; + return (property_get("ro.softwaregl", prop, NULL) > 0); +} + static int ALIGN(int x, int y) { // y must be a power of 2. return (x + y - 1) & ~(y - 1); @@ -106,7 +111,7 @@ void SoftwareRenderer::resetFormatIfChanged(const sp<AMessage> &format) { size_t bufHeight = mCropHeight; // hardware has YUV12 and RGBA8888 support, so convert known formats - if (!runningInEmulator()) { + if (!runningInEmulator() && !needsSoftwareRendering()) { switch (mColorFormat) { case OMX_COLOR_FormatYUV420Planar: case OMX_COLOR_FormatYUV420SemiPlanar: |