Home | History | Annotate | Download | only in chromium-trace

Lines Matching refs:devicePixelRatio

63 parseInt(c.borderTopWidth)-parseInt(c.borderBottomWidth),b=window.devicePixelRatio||1;this.canvas_.width!=a&&(this.canvas_.width=a*b,this.canvas_.style.width=a+"px");this.canvas_.height!=c&&(this.canvas_.height=c*b,this.canvas_.style.height=c+"px")},get firstCanvas(){return this.canvas_}};return{CanvasBasedTrack:d}});
69 b.moveTo(w-4*d,g),b.lineTo(w,0),b.lineTo(w+4*d,g),b.closePath(),b.fill())}q.flush();b.restore();q=window.devicePixelRatio||1;if(8<g){b.textAlign="center";b.textBaseline="top";b.font=10*q+"px sans-serif";b.strokeStyle="rgb(0,0,0)";b.fillStyle="rgb(0,0,0)";w=20*d;v=this.SHOULD_ELIDE_TEXT;for(u=r;u<p.length;++u){s=p[u];if(s.start>e)break;s.duration>w&&(r=s.title,s.didNotFinish&&(r+=" (Did Not Finish)"),x=this.labelWidth(r),v&&this.labelWidthWorld(r,d)>s.duration&&(x=this.elidedTitleCache.get(this,d,
70 r,x,s.duration),r=x.string,x=x.width),x*d<s.duration&&(s=c.xWorldToView(s.start+0.5*s.duration),b.fillText(r,s,2.5*q,x)))}}c.drawOverContent(b,m,e,g)},addIntersectingItemsToSelection:function(b,a,f){var e=this.getBoundingClientRect();if(a<e.top||a>=e.bottom)return!1;b=this.viewport_.xViewVectorToWorld(b*devicePixelRatio);b=tracing.findLowIndexInSortedIntervals(this.slices_,function(b){return b.start},function(b){return b.duration},b);return 0<=b&&b<this.slices_.length?(f=f.addSlice(this,this.slices_[b]),
71 this.decorateHit(f),!0):!1},addIntersectingItemsInRangeToSelection:function(b,a,f,e,g){function c(b){b=g.addSlice(p,b);p.decorateHit(b)}var d=window.devicePixelRatio
116 u+k);b.lineTo(x,s);b.lineTo(x,y);r=v;u=x;s=y}b.closePath();b.fill()}b.fillStyle="rgba(255, 0, 0, 1)";for(v in this.selectedSamples_)if(this.selectedSamples_[v]){x=a.timestamps[v];for(p=a.numSeries-1;0<=p;p--)y=a.totals[v*l+p],y=e-q*y,b.fillRect(x-j,y-1,3*j,3)}b.restore();c.drawOverContent(b,h,f,e)},addIntersectingItemsToSelection:function(a,b,f){var e=this.getBoundingClientRect();if(b<e.top||b>=e.bottom)return!1;b=this.viewport_.xViewVectorToWorld(a*devicePixelRatio);e=this.counter_;if(a<this.counter_.timestamps[0])return!1;
117 a=tracing.findLowIndexInSortedArray(e.timestamps,function(b){return b},b);if(0>a||a>=e.timestamps.length)return!1;0<a&&b>this.counter_.timestamps[a-1]&&a--;this.getBoundingClientRect();f=f.addCounterSample(this,this.counter,a);this.decorateHit(f);return!0},addIntersectingItemsInRangeToSelection:function(a,b,f,e,c){var d=this.getBoundingClientRect();f=Math.max(f,d.top);e=Math.min(e,d.bottom);if(!(f>e)){e=this.counter_;d=window.devicePixelRatio||1;a=this.viewport_.xViewToWorld(a*d);d=this.viewport_.xViewToWorld(b*
138 base.exportTo("tracing.tracks",function(){var d=tracing.ui.define(tracing.tracks.CanvasBasedTrack),c=Math.log(10);d.prototype={__proto__:tracing.tracks.CanvasBasedTrack.prototype,decorate:function(){this.classList.add("ruler-track");this.strings_secs_=[];this.strings_msecs_=[];this.addEventListener("mousedown",this.onMouseDown)},onMouseDown:function(a){0==a.button&&this.placeAndBeginDraggingMarker(a.clientX)},placeAndBeginDraggingMarker:function(a){var b=window.devicePixelRatio||1;a=this.viewport_.xViewToWorld((a-
141 for(var g=e.xViewToWorld(0),d=e.xViewToWorld(b),h=this.classList.contains("ruler-track-with-distance-measurements"),k=h?f/2:f,l=0;l<e.markers.length;++l)e.markers[l].drawTriangle_(a,g,d,f,k,e);var t=window.devicePixelRatio
142 5),l=Math.floor(g/q)*q,f=Math.floor(0.25*f);a.fillStyle="rgb(0, 0, 0)";a.strokeStyle="rgb(0, 0, 0)";a.textAlign="left";a.textBaseline="top";t=window.devicePixelRatio||1;a.font=9*t+"px sans-serif";for(g=l;g<d;g+=q){var s=Math.floor(e.xWorldToView(g)),l=Math.floor(1E5*(g/p))/1E5;r[l]||(r[l]=l+" "+m);a.fillText(r[l],s+2*t,0);a.beginPath();a.moveTo(s,0);a.lineTo(s,k);for(l=1;5>l;++l){var w=Math.floor(s+u*l);a.moveTo(w,k-f);a.lineTo(w,k)}a.stroke()}if(h){a.moveTo(0,k);a.lineTo(b,k);a.stroke();b=e.markers.slice();
155 this.dragBoxXEnd_,this.dragBoxYEnd_,b))}},onKeyup_:function(b){this.listenToKeys_&&(b.shiftKey||this.dragBeginEvent_&&this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_,b.shiftKey))},zoomBy_:function(b){if(this.firstCanvas){var a=this.viewport_,e=this.firstCanvas.clientWidth,c=this.lastMouseViewPos_.x*(window.devicePixelRatio||1),d=a.xViewToWorld(c);a.scaleX*=b;a.xPanWorldPosToViewPos(d,c,e)}},zoomToSelection_:function(){if(this.selection){var b=this.selection.bounds,
161 m.top,a=m);this.dragBox_.style.left=a.left+"px";this.dragBox_.style.width=a.width+"px";this.dragBox_.style.top=a.top+"px";this.dragBox_.style.height=a.height+"px";a=window.devicePixelRatio||1;c=this.firstCanvas;h=this.viewport_.xViewToWorld((h-c.offsetLeft)*a);b=this.viewport_.xViewToWorld((b-c.offsetLeft)*a);a=Math.round(100*(b-h))/100;this.dragBox_.textContent=a+"ms";a=new base.Event("selectionChanging");a.loWX=h;a.hiWX=b;this.dispatchEvent(a)},onGridToggle_:function(b){b=b?this.selection_.bounds.min: