Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1490891. Support toggling paint flashing in blob images r=mstange
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmuizel committed Sep 13, 2018
1 parent 9f75acf commit 23d2a56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions gfx/thebes/gfxPrefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ class gfxPrefs final
DECL_GFX_PREF(Once, "gfx.webrender.all.qualified", WebRenderAllQualified, bool, true);
DECL_GFX_PREF(Live, "gfx.webrender.blob-images", WebRenderBlobImages, bool, true);
DECL_GFX_PREF(Live, "gfx.webrender.blob.invalidation", WebRenderBlobInvalidation, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.blob.paint-flashing", WebRenderBlobPaintFlashing, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.dl.dump-parent", WebRenderDLDumpParent, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.dl.dump-content", WebRenderDLDumpContent, bool, false);
DECL_GFX_PREF(Once, "gfx.webrender.enabled", WebRenderEnabledDoNotUseDirectly, bool, false);
Expand Down
15 changes: 8 additions & 7 deletions gfx/webrender_bindings/Moz2DImageRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "gfxPrefs.h"
#include "gfxUtils.h"
#include "mozilla/Mutex.h"
#include "mozilla/Range.h"
Expand Down Expand Up @@ -447,13 +448,13 @@ static bool Moz2DRenderCallback(const Range<const uint8_t> aBlob,
offset = extra_end;
}

#if 0
dt->SetTransform(gfx::Matrix());
float r = float(rand()) / RAND_MAX;
float g = float(rand()) / RAND_MAX;
float b = float(rand()) / RAND_MAX;
dt->FillRect(gfx::Rect(0, 0, aSize.width, aSize.height), gfx::ColorPattern(gfx::Color(r, g, b, 0.5)));
#endif
if (gfxPrefs::WebRenderBlobPaintFlashing()) {
dt->SetTransform(gfx::Matrix());
float r = float(rand()) / RAND_MAX;
float g = float(rand()) / RAND_MAX;
float b = float(rand()) / RAND_MAX;
dt->FillRect(gfx::Rect(origin.x, origin.y, aSize.width, aSize.height), gfx::ColorPattern(gfx::Color(r, g, b, 0.5)));
}

if (aDirtyRect) {
dt->PopClip();
Expand Down
1 change: 1 addition & 0 deletions modules/libpref/init/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ pref("gfx.compositor.glcontext.opaque", false);
pref("gfx.webrender.highlight-painted-layers", false);
pref("gfx.webrender.blob-images", true);
pref("gfx.webrender.blob.invalidation", true);
pref("gfx.webrender.blob.paint-flashing", true);

// WebRender debugging utilities.
pref("gfx.webrender.debug.texture-cache", false);
Expand Down

0 comments on commit 23d2a56

Please sign in to comment.