зеркало из https://github.com/mozilla/gecko-dev.git
Add debug code, unapply me later
This commit is contained in:
Родитель
a0d8718e27
Коммит
71fe29a342
|
@ -244,6 +244,7 @@ CompositorParent::AsyncRender()
|
||||||
void
|
void
|
||||||
CompositorParent::ShadowLayersUpdated()
|
CompositorParent::ShadowLayersUpdated()
|
||||||
{
|
{
|
||||||
|
printf_stderr("ShadowLayersUpdated\n");
|
||||||
const nsTArray<PLayersParent*>& shadowParents = ManagedPLayersParent();
|
const nsTArray<PLayersParent*>& shadowParents = ManagedPLayersParent();
|
||||||
NS_ABORT_IF_FALSE(shadowParents.Length() <= 1,
|
NS_ABORT_IF_FALSE(shadowParents.Length() <= 1,
|
||||||
"can only support at most 1 ShadowLayersParent");
|
"can only support at most 1 ShadowLayersParent");
|
||||||
|
|
|
@ -564,6 +564,7 @@ bool LayerManagerOGL::sDrawFPS = false;
|
||||||
void
|
void
|
||||||
LayerManagerOGL::FPSState::DrawFPS(GLContext* context, CopyProgram* copyprog)
|
LayerManagerOGL::FPSState::DrawFPS(GLContext* context, CopyProgram* copyprog)
|
||||||
{
|
{
|
||||||
|
printf_stderr("draw fps\n");
|
||||||
fcount++;
|
fcount++;
|
||||||
|
|
||||||
int rate = 30;
|
int rate = 30;
|
||||||
|
@ -760,7 +761,6 @@ LayerManagerOGL::BindAndDrawQuadWithTextureRect(LayerProgram *aProg,
|
||||||
void
|
void
|
||||||
LayerManagerOGL::Render()
|
LayerManagerOGL::Render()
|
||||||
{
|
{
|
||||||
printf_stderr("render\n");
|
|
||||||
SAMPLE_LABEL("LayerManagerOGL", "Render");
|
SAMPLE_LABEL("LayerManagerOGL", "Render");
|
||||||
if (mDestroyed) {
|
if (mDestroyed) {
|
||||||
NS_WARNING("Call on destroyed layer manager");
|
NS_WARNING("Call on destroyed layer manager");
|
||||||
|
@ -779,6 +779,8 @@ LayerManagerOGL::Render()
|
||||||
if (width == 0 || height == 0)
|
if (width == 0 || height == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
printf_stderr("render %i, %i\n", width, height);
|
||||||
|
|
||||||
// If the widget size changed, we have to force a MakeCurrent
|
// If the widget size changed, we have to force a MakeCurrent
|
||||||
// to make sure that GL sees the updated widget size.
|
// to make sure that GL sees the updated widget size.
|
||||||
if (mWidgetSize.width != width ||
|
if (mWidgetSize.width != width ||
|
||||||
|
@ -812,7 +814,18 @@ LayerManagerOGL::Render()
|
||||||
|
|
||||||
mGLContext->fEnable(LOCAL_GL_SCISSOR_TEST);
|
mGLContext->fEnable(LOCAL_GL_SCISSOR_TEST);
|
||||||
|
|
||||||
|
static int i = 0;
|
||||||
|
i++;
|
||||||
|
i=i%3;
|
||||||
|
if( i == 0 ) {
|
||||||
|
mGLContext->fClearColor(1.0, 0.0, 0.0, 0.0);
|
||||||
|
} else if( i == 1 ) {
|
||||||
mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0);
|
mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0);
|
||||||
|
} else if( i == 2 ) {
|
||||||
|
mGLContext->fClearColor(1.0, 1.0, 0.0, 0.0);
|
||||||
|
} else {
|
||||||
|
mGLContext->fClearColor(0.0, 1.0, 0.0, 0.0);
|
||||||
|
}
|
||||||
mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
|
mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
// Render our layers.
|
// Render our layers.
|
||||||
|
|
|
@ -907,6 +907,7 @@ ShadowThebesLayerOGL::Swap(const ThebesBuffer& aNewFront,
|
||||||
OptionalThebesBuffer* aReadOnlyFront,
|
OptionalThebesBuffer* aReadOnlyFront,
|
||||||
nsIntRegion* aFrontUpdatedRegion)
|
nsIntRegion* aFrontUpdatedRegion)
|
||||||
{
|
{
|
||||||
|
printf_stderr("Thebes Swap\n");
|
||||||
if (!mDestroyed) {
|
if (!mDestroyed) {
|
||||||
if (!mBuffer) {
|
if (!mBuffer) {
|
||||||
mBuffer = new ShadowBufferOGL(this);
|
mBuffer = new ShadowBufferOGL(this);
|
||||||
|
|
|
@ -3328,7 +3328,7 @@ pref("layers.acceleration.disabled", false);
|
||||||
// Whether to force acceleration on, ignoring blacklists.
|
// Whether to force acceleration on, ignoring blacklists.
|
||||||
pref("layers.acceleration.force-enabled", false);
|
pref("layers.acceleration.force-enabled", false);
|
||||||
|
|
||||||
pref("layers.acceleration.draw-fps", false);
|
pref("layers.acceleration.draw-fps", true);
|
||||||
|
|
||||||
pref("layers.offmainthreadcomposition.enabled", false);
|
pref("layers.offmainthreadcomposition.enabled", false);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче