Skip to content

Commit 1afeea0

Browse files
pixelflingerAndroid (Google) Code Review
authored andcommitted
Merge "work around a problem where fp registers get corrupted (DO NOT MERGE)" into ics-factoryrom
2 parents a2a960b + a5f7b3c commit 1afeea0

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)