Rename _ol_render_webgl_ReplayGroup_ to WebGLReplayGroup

This commit is contained in:
Frederic Junod
2018-01-15 09:51:57 +01:00
parent 85e1a6b54f
commit cb66d66526
3 changed files with 27 additions and 27 deletions

View File

@@ -6,7 +6,7 @@ import {intersects} from '../../extent.js';
import GeometryType from '../../geom/GeometryType.js';
import ReplayType from '../ReplayType.js';
import VectorContext from '../VectorContext.js';
import _ol_render_webgl_ReplayGroup_ from '../webgl/ReplayGroup.js';
import WebGLReplayGroup from '../webgl/ReplayGroup.js';
/**
* @constructor
@@ -198,7 +198,7 @@ _ol_render_webgl_Immediate_.prototype.drawGeometryCollection = function(geometry
*/
_ol_render_webgl_Immediate_.prototype.drawPoint = function(geometry, data) {
const context = this.context_;
const replayGroup = new _ol_render_webgl_ReplayGroup_(1, this.extent_);
const replayGroup = new WebGLReplayGroup(1, this.extent_);
const replay = /** @type {ol.render.webgl.ImageReplay} */ (
replayGroup.getReplay(0, ReplayType.IMAGE));
replay.setImageStyle(this.imageStyle_);
@@ -225,7 +225,7 @@ _ol_render_webgl_Immediate_.prototype.drawPoint = function(geometry, data) {
*/
_ol_render_webgl_Immediate_.prototype.drawMultiPoint = function(geometry, data) {
const context = this.context_;
const replayGroup = new _ol_render_webgl_ReplayGroup_(1, this.extent_);
const replayGroup = new WebGLReplayGroup(1, this.extent_);
const replay = /** @type {ol.render.webgl.ImageReplay} */ (
replayGroup.getReplay(0, ReplayType.IMAGE));
replay.setImageStyle(this.imageStyle_);
@@ -251,7 +251,7 @@ _ol_render_webgl_Immediate_.prototype.drawMultiPoint = function(geometry, data)
*/
_ol_render_webgl_Immediate_.prototype.drawLineString = function(geometry, data) {
const context = this.context_;
const replayGroup = new _ol_render_webgl_ReplayGroup_(1, this.extent_);
const replayGroup = new WebGLReplayGroup(1, this.extent_);
const replay = /** @type {ol.render.webgl.LineStringReplay} */ (
replayGroup.getReplay(0, ReplayType.LINE_STRING));
replay.setFillStrokeStyle(null, this.strokeStyle_);
@@ -277,7 +277,7 @@ _ol_render_webgl_Immediate_.prototype.drawLineString = function(geometry, data)
*/
_ol_render_webgl_Immediate_.prototype.drawMultiLineString = function(geometry, data) {
const context = this.context_;
const replayGroup = new _ol_render_webgl_ReplayGroup_(1, this.extent_);
const replayGroup = new WebGLReplayGroup(1, this.extent_);
const replay = /** @type {ol.render.webgl.LineStringReplay} */ (
replayGroup.getReplay(0, ReplayType.LINE_STRING));
replay.setFillStrokeStyle(null, this.strokeStyle_);
@@ -303,7 +303,7 @@ _ol_render_webgl_Immediate_.prototype.drawMultiLineString = function(geometry, d
*/
_ol_render_webgl_Immediate_.prototype.drawPolygon = function(geometry, data) {
const context = this.context_;
const replayGroup = new _ol_render_webgl_ReplayGroup_(1, this.extent_);
const replayGroup = new WebGLReplayGroup(1, this.extent_);
const replay = /** @type {ol.render.webgl.PolygonReplay} */ (
replayGroup.getReplay(0, ReplayType.POLYGON));
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
@@ -329,7 +329,7 @@ _ol_render_webgl_Immediate_.prototype.drawPolygon = function(geometry, data) {
*/
_ol_render_webgl_Immediate_.prototype.drawMultiPolygon = function(geometry, data) {
const context = this.context_;
const replayGroup = new _ol_render_webgl_ReplayGroup_(1, this.extent_);
const replayGroup = new WebGLReplayGroup(1, this.extent_);
const replay = /** @type {ol.render.webgl.PolygonReplay} */ (
replayGroup.getReplay(0, ReplayType.POLYGON));
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
@@ -355,7 +355,7 @@ _ol_render_webgl_Immediate_.prototype.drawMultiPolygon = function(geometry, data
*/
_ol_render_webgl_Immediate_.prototype.drawCircle = function(geometry, data) {
const context = this.context_;
const replayGroup = new _ol_render_webgl_ReplayGroup_(1, this.extent_);
const replayGroup = new WebGLReplayGroup(1, this.extent_);
const replay = /** @type {ol.render.webgl.CircleReplay} */ (
replayGroup.getReplay(0, ReplayType.CIRCLE));
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);

View File

@@ -21,7 +21,7 @@ import _ol_render_webgl_TextReplay_ from '../webgl/TextReplay.js';
* @param {number=} opt_renderBuffer Render buffer.
* @struct
*/
const _ol_render_webgl_ReplayGroup_ = function(tolerance, maxExtent, opt_renderBuffer) {
const WebGLReplayGroup = function(tolerance, maxExtent, opt_renderBuffer) {
ReplayGroup.call(this);
/**
@@ -51,21 +51,21 @@ const _ol_render_webgl_ReplayGroup_ = function(tolerance, maxExtent, opt_renderB
};
inherits(_ol_render_webgl_ReplayGroup_, ReplayGroup);
inherits(WebGLReplayGroup, ReplayGroup);
/**
* @param {ol.style.Style} style Style.
* @param {boolean} group Group with previous replay.
*/
_ol_render_webgl_ReplayGroup_.prototype.addDeclutter = function(style, group) {};
WebGLReplayGroup.prototype.addDeclutter = function(style, group) {};
/**
* @param {ol.webgl.Context} context WebGL context.
* @return {function()} Delete resources function.
*/
_ol_render_webgl_ReplayGroup_.prototype.getDeleteResourcesFunction = function(context) {
WebGLReplayGroup.prototype.getDeleteResourcesFunction = function(context) {
const functions = [];
let zKey;
for (zKey in this.replaysByZIndex_) {
@@ -89,7 +89,7 @@ _ol_render_webgl_ReplayGroup_.prototype.getDeleteResourcesFunction = function(co
/**
* @param {ol.webgl.Context} context Context.
*/
_ol_render_webgl_ReplayGroup_.prototype.finish = function(context) {
WebGLReplayGroup.prototype.finish = function(context) {
let zKey;
for (zKey in this.replaysByZIndex_) {
const replays = this.replaysByZIndex_[zKey];
@@ -103,7 +103,7 @@ _ol_render_webgl_ReplayGroup_.prototype.finish = function(context) {
/**
* @inheritDoc
*/
_ol_render_webgl_ReplayGroup_.prototype.getReplay = function(zIndex, replayType) {
WebGLReplayGroup.prototype.getReplay = function(zIndex, replayType) {
const zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';
let replays = this.replaysByZIndex_[zIndexKey];
if (replays === undefined) {
@@ -115,7 +115,7 @@ _ol_render_webgl_ReplayGroup_.prototype.getReplay = function(zIndex, replayType)
/**
* @type {Function}
*/
const Constructor = _ol_render_webgl_ReplayGroup_.BATCH_CONSTRUCTORS_[replayType];
const Constructor = WebGLReplayGroup.BATCH_CONSTRUCTORS_[replayType];
replay = new Constructor(this.tolerance_, this.maxExtent_);
replays[replayType] = replay;
}
@@ -126,7 +126,7 @@ _ol_render_webgl_ReplayGroup_.prototype.getReplay = function(zIndex, replayType)
/**
* @inheritDoc
*/
_ol_render_webgl_ReplayGroup_.prototype.isEmpty = function() {
WebGLReplayGroup.prototype.isEmpty = function() {
return _ol_obj_.isEmpty(this.replaysByZIndex_);
};
@@ -142,7 +142,7 @@ _ol_render_webgl_ReplayGroup_.prototype.isEmpty = function() {
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip.
*/
_ol_render_webgl_ReplayGroup_.prototype.replay = function(context,
WebGLReplayGroup.prototype.replay = function(context,
center, resolution, rotation, size, pixelRatio,
opacity, skippedFeaturesHash) {
/** @type {Array.<number>} */
@@ -183,7 +183,7 @@ _ol_render_webgl_ReplayGroup_.prototype.replay = function(context,
* @return {T|undefined} Callback result.
* @template T
*/
_ol_render_webgl_ReplayGroup_.prototype.replayHitDetection_ = function(context,
WebGLReplayGroup.prototype.replayHitDetection_ = function(context,
center, resolution, rotation, size, pixelRatio, opacity,
skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent) {
/** @type {Array.<number>} */
@@ -226,7 +226,7 @@ _ol_render_webgl_ReplayGroup_.prototype.replayHitDetection_ = function(context,
* @return {T|undefined} Callback result.
* @template T
*/
_ol_render_webgl_ReplayGroup_.prototype.forEachFeatureAtCoordinate = function(
WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function(
coordinate, context, center, resolution, rotation, size, pixelRatio,
opacity, skippedFeaturesHash,
callback) {
@@ -246,7 +246,7 @@ _ol_render_webgl_ReplayGroup_.prototype.forEachFeatureAtCoordinate = function(
}
return this.replayHitDetection_(context,
coordinate, resolution, rotation, _ol_render_webgl_ReplayGroup_.HIT_DETECTION_SIZE_,
coordinate, resolution, rotation, WebGLReplayGroup.HIT_DETECTION_SIZE_,
pixelRatio, opacity, skippedFeaturesHash,
/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
@@ -279,7 +279,7 @@ _ol_render_webgl_ReplayGroup_.prototype.forEachFeatureAtCoordinate = function(
* to skip.
* @return {boolean} Is there a feature at the given coordinate?
*/
_ol_render_webgl_ReplayGroup_.prototype.hasFeatureAtCoordinate = function(
WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function(
coordinate, context, center, resolution, rotation, size, pixelRatio,
opacity, skippedFeaturesHash) {
const gl = context.getGL();
@@ -287,7 +287,7 @@ _ol_render_webgl_ReplayGroup_.prototype.hasFeatureAtCoordinate = function(
gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());
const hasFeature = this.replayHitDetection_(context,
coordinate, resolution, rotation, _ol_render_webgl_ReplayGroup_.HIT_DETECTION_SIZE_,
coordinate, resolution, rotation, WebGLReplayGroup.HIT_DETECTION_SIZE_,
pixelRatio, opacity, skippedFeaturesHash,
/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
@@ -307,7 +307,7 @@ _ol_render_webgl_ReplayGroup_.prototype.hasFeatureAtCoordinate = function(
* @private
* @type {Array.<number>}
*/
_ol_render_webgl_ReplayGroup_.HIT_DETECTION_SIZE_ = [1, 1];
WebGLReplayGroup.HIT_DETECTION_SIZE_ = [1, 1];
/**
* @const
@@ -316,11 +316,11 @@ _ol_render_webgl_ReplayGroup_.HIT_DETECTION_SIZE_ = [1, 1];
* function(new: ol.render.webgl.Replay, number,
* ol.Extent)>}
*/
_ol_render_webgl_ReplayGroup_.BATCH_CONSTRUCTORS_ = {
WebGLReplayGroup.BATCH_CONSTRUCTORS_ = {
'Circle': _ol_render_webgl_CircleReplay_,
'Image': _ol_render_webgl_ImageReplay_,
'LineString': _ol_render_webgl_LineStringReplay_,
'Polygon': _ol_render_webgl_PolygonReplay_,
'Text': _ol_render_webgl_TextReplay_
};
export default _ol_render_webgl_ReplayGroup_;
export default WebGLReplayGroup;

View File

@@ -5,7 +5,7 @@ import {getUid, inherits} from '../../index.js';
import LayerType from '../../LayerType.js';
import ViewHint from '../../ViewHint.js';
import {buffer, containsExtent, createEmpty} from '../../extent.js';
import _ol_render_webgl_ReplayGroup_ from '../../render/webgl/ReplayGroup.js';
import WebGLReplayGroup from '../../render/webgl/ReplayGroup.js';
import RendererType from '../Type.js';
import _ol_renderer_vector_ from '../vector.js';
import WebGLLayerRenderer from '../webgl/Layer.js';
@@ -256,7 +256,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
this.dirty_ = false;
const replayGroup = new _ol_render_webgl_ReplayGroup_(
const replayGroup = new WebGLReplayGroup(
_ol_renderer_vector_.getTolerance(resolution, pixelRatio),
extent, vectorLayer.getRenderBuffer());
vectorSource.loadFeatures(extent, resolution, projection);