mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 13:45:46 +00:00
Bug 938395 - Enable single rect painting for d3d10. r=Bas
This commit is contained in:
parent
abac769686
commit
f67185f255
@ -412,6 +412,8 @@ ThebesLayerD3D10::DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode)
|
||||
destinationSurface = mD2DSurface;
|
||||
}
|
||||
|
||||
aRegion.SimplifyOutwardByArea(100 * 100);
|
||||
|
||||
MOZ_ASSERT(mDrawTarget);
|
||||
nsRefPtr<gfxContext> context = new gfxContext(mDrawTarget);
|
||||
|
||||
|
@ -205,6 +205,7 @@ private:
|
||||
DECL_GFX_PREF(Once, "layout.css.touch_action.enabled", TouchActionEnabled, bool, false);
|
||||
DECL_GFX_PREF(Once, "layout.frame_rate", LayoutFrameRate, int32_t, -1);
|
||||
DECL_GFX_PREF(Live, "layout.display-list.dump", LayoutDumpDisplayList, bool, false);
|
||||
DECL_GFX_PREF(Once, "layout.paint_rects_separately", LayoutPaintRectsSeparately, bool, true);
|
||||
|
||||
DECL_GFX_PREF(Live, "nglayout.debug.widget_update_flashing", WidgetUpdateFlashing, bool, false);
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/gfx/Tools.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "gfxPrefs.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -3705,14 +3705,7 @@ FrameLayerBuilder::PaintItems(nsTArray<ClippedDisplayItem>& aItems,
|
||||
*/
|
||||
static bool ShouldDrawRectsSeparately(gfxContext* aContext, DrawRegionClip aClip)
|
||||
{
|
||||
static bool sPaintRectsSeparately;
|
||||
static bool sPaintRectsSeparatelyPrefCached = false;
|
||||
if (!sPaintRectsSeparatelyPrefCached) {
|
||||
mozilla::Preferences::AddBoolVarCache(&sPaintRectsSeparately, "layout.paint_rects_separately", false);
|
||||
sPaintRectsSeparatelyPrefCached = true;
|
||||
}
|
||||
|
||||
if (!sPaintRectsSeparately ||
|
||||
if (!gfxPrefs::LayoutPaintRectsSeparately() ||
|
||||
aContext->IsCairo() ||
|
||||
aClip == DrawRegionClip::CLIP_NONE) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user