Skip to content

Commit fc8e5ea

Browse files
Romain GuyAndroid (Google) Code Review
authored andcommitted
Merge "Ensure we start every frame in the proper GL state Bug #6345013, #6314960" into jb-dev
2 parents 344c993 + c189ef5 commit fc8e5ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libs/hwui/OpenGLRenderer.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,13 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
278278
}
279279
}
280280

281+
// Restore state possibly changed by the functors in process mode
282+
GLboolean value;
283+
glGetBooleanv(GL_BLEND, &value);
284+
mCaches.blend = value;
285+
286+
mCaches.activeTexture(0);
287+
281288
return result;
282289
}
283290

@@ -2787,6 +2794,7 @@ void OpenGLRenderer::drawTextureMesh(float left, float top, float right, float b
27872794
void OpenGLRenderer::chooseBlending(bool blend, SkXfermode::Mode mode,
27882795
ProgramDescription& description, bool swapSrcDst) {
27892796
blend = blend || mode != SkXfermode::kSrcOver_Mode;
2797+
27902798
if (blend) {
27912799
// These blend modes are not supported by OpenGL directly and have
27922800
// to be implemented using shaders. Since the shader will perform

0 commit comments

Comments
 (0)