modules/graphics/src/main/java/com/sun/javafx/sg/prism/RegionImageCache.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 28,37 ****
--- 28,38 ----
import javafx.scene.layout.Background;
import java.util.HashMap;
import com.sun.javafx.geom.Rectangle;
import com.sun.javafx.geom.Shape;
import com.sun.javafx.logging.PulseLogger;
+ import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED;
import com.sun.prism.Graphics;
import com.sun.prism.RTTexture;
import com.sun.prism.ResourceFactory;
import com.sun.prism.Texture.WrapMode;
import com.sun.prism.impl.packrect.RectanglePacker;
*** 124,135 ****
vPacker.clear();
hPacker.clear();
imageMap.clear();
packer.add(rect);
backingStore.createGraphics().clear();
! if (PulseLogger.PULSE_LOGGING_ENABLED) {
! PulseLogger.PULSE_LOGGER.renderIncrementCounter("Region image cache flushed");
}
}
imageMap.put(key, new CachedImage(rect, background, shape));
return true;
}
--- 125,136 ----
vPacker.clear();
hPacker.clear();
imageMap.clear();
packer.add(rect);
backingStore.createGraphics().clear();
! if (PULSE_LOGGING_ENABLED) {
! PulseLogger.incrementCounter("Region image cache flushed");
}
}
imageMap.put(key, new CachedImage(rect, background, shape));
return true;
}