forked from zsol/android_frameworks_base
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct gralloc usage flags for renderer and some code style improvem…
…ents
- Loading branch information
1 parent
850bd1b
commit c9a1797
Showing
3 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ | |
#include <ui/GraphicBufferMapper.h> | ||
#include <gui/ISurfaceTexture.h> | ||
|
||
#ifdef QCOM_LEGACY_OMX | ||
#include <gralloc_priv.h> | ||
#endif | ||
|
||
namespace android { | ||
|
||
#ifdef QCOM_HARDWARE | ||
|
@@ -83,7 +87,7 @@ SoftwareRenderer::SoftwareRenderer( | |
halFormat = HAL_PIXEL_FORMAT_YCrCb_420_SP; | ||
bufWidth = (mCropWidth + 1) & ~1; | ||
bufHeight = (mCropHeight + 1) & ~1; | ||
mAlign = ((mWidth + 15) & -16) * ((mHeight + 15) & -16); | ||
mAlign = ALIGN(mWidth, 16) * ALIGN(mHeight, 16); | ||
This comment has been minimized.
Sorry, something went wrong.
ItachiSan
|
||
break; | ||
} | ||
#endif | ||
|
@@ -112,7 +116,11 @@ SoftwareRenderer::SoftwareRenderer( | |
native_window_set_usage( | ||
mNativeWindow.get(), | ||
GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN | ||
| GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP)); | ||
| GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP | ||
#ifdef QCOM_LEGACY_OMX | ||
| GRALLOC_USAGE_PRIVATE_ADSP_HEAP | GRALLOC_USAGE_PRIVATE_UNCACHED | ||
#endif | ||
)); | ||
|
||
CHECK_EQ(0, | ||
native_window_set_scaling_mode( | ||
|
@@ -289,4 +297,4 @@ void SoftwareRenderer::render( | |
buf = NULL; | ||
} | ||
|
||
} // namespace android | ||
} // namespace android |
This line change gives compilation error now, sorry. You can use old line without problems.