Remove goog.isNull in webgl classes
This commit is contained in:
@@ -93,7 +93,7 @@ ol.webgl.Context = function(canvas, gl) {
|
|||||||
// use the OES_element_index_uint extension if available
|
// use the OES_element_index_uint extension if available
|
||||||
if (this.hasOESElementIndexUint) {
|
if (this.hasOESElementIndexUint) {
|
||||||
var ext = gl.getExtension('OES_element_index_uint');
|
var ext = gl.getExtension('OES_element_index_uint');
|
||||||
goog.asserts.assert(!goog.isNull(ext),
|
goog.asserts.assert(ext,
|
||||||
'Failed to get extension "OES_element_index_uint"');
|
'Failed to get extension "OES_element_index_uint"');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ ol.webgl.Context.prototype.getGL = function() {
|
|||||||
* @return {WebGLFramebuffer} The hit detection frame buffer.
|
* @return {WebGLFramebuffer} The hit detection frame buffer.
|
||||||
*/
|
*/
|
||||||
ol.webgl.Context.prototype.getHitDetectionFramebuffer = function() {
|
ol.webgl.Context.prototype.getHitDetectionFramebuffer = function() {
|
||||||
if (goog.isNull(this.hitDetectionFramebuffer_)) {
|
if (!this.hitDetectionFramebuffer_) {
|
||||||
this.initHitDetectionFramebuffer_();
|
this.initHitDetectionFramebuffer_();
|
||||||
}
|
}
|
||||||
return this.hitDetectionFramebuffer_;
|
return this.hitDetectionFramebuffer_;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ ol.webgl.getContext = function(canvas, opt_attributes) {
|
|||||||
for (i = 0; i < ii; ++i) {
|
for (i = 0; i < ii; ++i) {
|
||||||
try {
|
try {
|
||||||
context = canvas.getContext(ol.webgl.CONTEXT_IDS_[i], opt_attributes);
|
context = canvas.getContext(ol.webgl.CONTEXT_IDS_[i], opt_attributes);
|
||||||
if (!goog.isNull(context)) {
|
if (context) {
|
||||||
return /** @type {!WebGLRenderingContext} */ (context);
|
return /** @type {!WebGLRenderingContext} */ (context);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user