Skip to content

Commit a5f7b3c

Browse files
committed
work around a problem where fp registers get corrupted (DO NOT MERGE)
Bug: 5331198 Change-Id: I1f9b4a79d34d63f8adb0555909998664ea2ea9ca
1 parent 3d5759b commit a5f7b3c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libs/hwui/LayerRenderer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,20 @@ namespace uirenderer {
3131
// Rendering
3232
///////////////////////////////////////////////////////////////////////////////
3333

34+
Rect* gHackDontCorruptRegisters;
35+
3436
void LayerRenderer::prepareDirty(float left, float top, float right, float bottom, bool opaque) {
3537
LAYER_RENDERER_LOGD("Rendering into layer, fbo = %d", mLayer->getFbo());
3638

39+
Rect dirty(left, top, right, bottom);
40+
gHackDontCorruptRegisters = &dirty;
41+
3742
glBindFramebuffer(GL_FRAMEBUFFER, mLayer->getFbo());
3843

3944
const float width = mLayer->layer.getWidth();
4045
const float height = mLayer->layer.getHeight();
4146

4247
#if RENDER_LAYERS_AS_REGIONS
43-
Rect dirty(left, top, right, bottom);
4448
if (dirty.isEmpty() || (dirty.left <= 0 && dirty.top <= 0 &&
4549
dirty.right >= width && dirty.bottom >= height)) {
4650
mLayer->region.clear();

0 commit comments

Comments
 (0)