Use the first pixel for rendering, allow setting operations

This commit is contained in:
Tim Schaub
2015-02-23 23:14:04 -08:00
parent de107c5502
commit c6dedbc40b

View File

@@ -104,6 +104,15 @@ ol.source.Raster = function(options) {
goog.inherits(ol.source.Raster, ol.source.Image);
/**
* Reset the operations.
* @param {Array.<ol.raster.Operation>} operations New operations.
*/
ol.source.Raster.prototype.setOperations = function(operations) {
this.operations_ = operations;
};
/**
* Update the stored frame state.
* @param {ol.Extent} extent The view extent (in map units).
@@ -199,8 +208,7 @@ ol.source.Raster.prototype.composeFrame_ = function(frameState) {
pixel[2] = source[j + 2];
pixel[3] = source[j + 3];
}
this.runOperations_(pixels);
pixel = pixels[0];
pixel = this.runOperations_(pixels)[0];
target[j] = pixel[0];
target[j + 1] = pixel[1];
target[j + 2] = pixel[2];