Track program state more carefully to avoid setting unnecessarily

RESOLVED FIXED in mozilla36

Status

()

Core
Graphics: Layers
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Tracking

unspecified
mozilla36
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

3 years ago
The overall idea is to basically create pipeline objects that we can switch between and only set the different state. The first part of this is to do this with shaders as glUseProgram looks to be the biggest state change area in profiles on OS X.
(Assignee)

Comment 1

3 years ago
Created attachment 8495355 [details] [diff] [review]
Redo workaround to avoid using Activate()

Activate is going away and we can trigger the workaround more explicitly using raw opengl.
(Assignee)

Comment 2

3 years ago
Created attachment 8495406 [details] [diff] [review]
Track the current program on the compositor

This makes it so that we track the current program in use by compositor and only switch it if it is different.
Attachment #8495355 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Attachment #8495406 - Flags: review?(nical.bugzilla)

Updated

3 years ago
Attachment #8495406 - Flags: review?(nical.bugzilla) → review+
(Assignee)

Comment 3

3 years ago
This needs to be updated to clear the state when drawing from widget/android
(Assignee)

Comment 4

3 years ago
Created attachment 8512945 [details] [diff] [review]
This should fix up the android problem by adding a 'ResetProgram' function

This should fix up the android problem by adding a 'ResetProgram' function that's called when we get the gl context for raw use.
Assignee: nobody → jmuizelaar
Attachment #8495406 - Attachment is obsolete: true
Attachment #8512945 - Flags: review?(nical.bugzilla)

Updated

3 years ago
Attachment #8512945 - Flags: review?(nical.bugzilla) → review+
(Assignee)

Comment 5

3 years ago
Created attachment 8524116 [details] [diff] [review]
Also use reset in GLBlitTextureImage

This should be the final version of this.
Attachment #8512945 - Attachment is obsolete: true
Attachment #8524116 - Flags: review?(nical.bugzilla)
Comment on attachment 8524116 [details] [diff] [review]
Also use reset in GLBlitTextureImage

Review of attachment 8524116 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/opengl/OGLShaderProgram.cpp
@@ +549,3 @@
>      }
>    }
> +  MOZ_ASSERT(HasInitialized(), "Attempting to activate a program that's not in use!");

The message for this assertion makes much less sense now.
Attachment #8524116 - Flags: review?(nical.bugzilla) → review+
https://hg.mozilla.org/mozilla-central/rev/5140b218e6cc
https://hg.mozilla.org/mozilla-central/rev/f61b87621f13
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.