Bug 1557721 - Remove identical conversion. r=kvark
authorBruce Mitchener <bruce.mitchener@gmail.com>
Fri, 07 Jun 2019 16:16:12 +0000
changeset 477878 df0f7465489c6724f3f10545b1f17f07febceb4b
parent 477877 f3ff3843ce7d12f94463fc6ad5ef53b2c38e3916
child 477879 a18263c690b31c1629fed59b67300730ad0dd2e5
push id36125
push userapavel@mozilla.com
push dateFri, 07 Jun 2019 22:00:07 +0000
treeherdermozilla-central@d820bbb356aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskvark
bugs1557721
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1557721 - Remove identical conversion. r=kvark [wrupdater] From https://github.com/servo/webrender/pull/3667 Depends on D34159 Differential Revision: https://phabricator.services.mozilla.com/D34160
gfx/wr/webrender/src/display_list_flattener.rs
gfx/wr/webrender/src/glyph_rasterizer/mod.rs
gfx/wr/webrender/src/prim_store/mod.rs
gfx/wr/webrender/src/renderer.rs
gfx/wr/webrender_api/src/display_list.rs
--- a/gfx/wr/webrender/src/display_list_flattener.rs
+++ b/gfx/wr/webrender/src/display_list_flattener.rs
@@ -1451,17 +1451,17 @@ impl<'a> DisplayListFlattener<'a> {
         } else {
             debug_assert!(clip_items.is_empty(), "No per-prim clips expected for shadowed primitives");
 
             // There is an active shadow context. Store as a pending primitive
             // for processing during pop_all_shadows.
             self.pending_shadow_items.push_back(PendingPrimitive {
                 clip_and_scroll,
                 info: *info,
-                prim: prim.into(),
+                prim,
             }.into());
         }
     }
 
     fn add_prim_to_draw_list<P>(
         &mut self,
         info: &LayoutPrimitiveInfo,
         clip_chain_id: ClipChainId,
--- a/gfx/wr/webrender/src/glyph_rasterizer/mod.rs
+++ b/gfx/wr/webrender/src/glyph_rasterizer/mod.rs
@@ -233,17 +233,17 @@ impl FontInstance {
     pub fn new(
         base: Arc<BaseFontInstance>,
         color: ColorU,
         render_mode: FontRenderMode,
         flags: FontInstanceFlags,
     ) -> Self {
         FontInstance {
             transform: FontTransform::identity(),
-            color: color.into(),
+            color,
             size: base.size,
             base,
             render_mode,
             flags,
         }
     }
 
     pub fn from_base(
--- a/gfx/wr/webrender/src/prim_store/mod.rs
+++ b/gfx/wr/webrender/src/prim_store/mod.rs
@@ -1621,30 +1621,30 @@ impl PrimitiveScratchBuffer {
     #[allow(dead_code)]
     pub fn push_debug_rect(
         &mut self,
         rect: DeviceRect,
         color: ColorF,
     ) {
         self.debug_items.push(DebugItem::Rect {
             rect,
-            color: color.into(),
+            color,
         });
     }
 
     #[allow(dead_code)]
     pub fn push_debug_string(
         &mut self,
         position: DevicePoint,
         color: ColorF,
         msg: String,
     ) {
         self.debug_items.push(DebugItem::Text {
             position,
-            color: color.into(),
+            color,
             msg,
         });
     }
 }
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Clone, Debug)]
--- a/gfx/wr/webrender/src/renderer.rs
+++ b/gfx/wr/webrender/src/renderer.rs
@@ -3810,17 +3810,17 @@ impl Renderer {
                         target.last_access = frame_id;
                         target.fbo_id
                     }
                 };
                 let (src_rect, _) = render_tasks[output.task_id].get_target_rect();
                 self.device.blit_render_target_invert_y(
                     draw_target.into(),
                     draw_target.to_framebuffer_rect(src_rect.translate(&-content_origin.to_vector())),
-                    DrawTarget::External { fbo: fbo_id, size: output_size.into() },
+                    DrawTarget::External { fbo: fbo_id, size: output_size },
                     output_size.into(),
                 );
                 handler.unlock(output.pipeline_id);
             }
         }
     }
 
     /// Draw all the instances in a clip batcher list to the current target.
--- a/gfx/wr/webrender_api/src/display_list.rs
+++ b/gfx/wr/webrender_api/src/display_list.rs
@@ -273,17 +273,17 @@ fn skip_slice<'a, T: for<'de> Deserializ
     let skip_offset: usize = bincode::deserialize_from(&mut data).expect("MEH: malicious input?");
 
     let (skip, rest) = data.split_at(skip_offset);
 
     // Adjust data pointer to skip read values
     *data = rest;
 
     ItemRange {
-        bytes: skip.into(),
+        bytes: skip,
         _boo: PhantomData,
     }
 }
 
 impl<'a> BuiltDisplayListIter<'a> {
     pub fn new(list: &'a BuiltDisplayList) -> Self {
         Self::new_with_list_and_data(list, list.item_slice())
     }