Bug 1490891. Support toggling paint flashing in blob images r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D5730

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Muizelaar 2018-09-13 20:34:38 +00:00
Родитель 88b946bb6b
Коммит 9bcfb295a7
3 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -523,6 +523,7 @@ private:
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);

Просмотреть файл

@ -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"
@ -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();

Просмотреть файл

@ -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", false);
// WebRender debugging utilities.
pref("gfx.webrender.debug.texture-cache", false);