File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -262,13 +262,6 @@ cc.LABELATLAS_DEBUG_DRAW = 0;
262262
263263cc . DRAWNODE_TOTAL_VERTICES = 20000 ;
264264
265- /**
266- * Whether or not support retina display
267- * @constant
268- * @type {Number }
269- */
270- cc . IS_RETINA_DISPLAY_SUPPORTED = 1 ;
271-
272265/**
273266 * Default engine
274267 * @constant
Original file line number Diff line number Diff line change @@ -244,10 +244,8 @@ cc.FLT_EPSILON = 0.0000001192092896;
244244 * @return {Number }
245245 * @function
246246 */
247- cc . contentScaleFactor = cc . IS_RETINA_DISPLAY_SUPPORTED ? function ( ) {
247+ cc . contentScaleFactor = function ( ) {
248248 return cc . director . _contentScaleFactor ;
249- } : function ( ) {
250- return 1 ;
251249} ;
252250
253251/**
@@ -312,12 +310,10 @@ cc._sizePixelsToPointsOut = function (sizeInPixels, outSize) {
312310 * @return {cc.Rect }
313311 * @function
314312 */
315- cc . rectPixelsToPoints = cc . IS_RETINA_DISPLAY_SUPPORTED ? function ( pixel ) {
313+ cc . rectPixelsToPoints = function ( pixel ) {
316314 var scale = cc . contentScaleFactor ( ) ;
317315 return cc . rect ( pixel . x / scale , pixel . y / scale ,
318316 pixel . width / scale , pixel . height / scale ) ;
319- } : function ( p ) {
320- return p ;
321317} ;
322318
323319/**
@@ -326,12 +322,10 @@ cc.rectPixelsToPoints = cc.IS_RETINA_DISPLAY_SUPPORTED ? function (pixel) {
326322 * @return {cc.Rect }
327323 * @function
328324 */
329- cc . rectPointsToPixels = cc . IS_RETINA_DISPLAY_SUPPORTED ? function ( point ) {
325+ cc . rectPointsToPixels = function ( point ) {
330326 var scale = cc . contentScaleFactor ( ) ;
331327 return cc . rect ( point . x * scale , point . y * scale ,
332328 point . width * scale , point . height * scale ) ;
333- } : function ( p ) {
334- return p ;
335329} ;
336330
337331//some gl constant variable
You can’t perform that action at this time.
0 commit comments