Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy fixes #2614

Merged
merged 9 commits into from Apr 6, 2018

webrender: Remove unnecessary mut references.

  • Loading branch information
waywardmonkeys committed Apr 5, 2018
commit b49184bd665168a275764d4d31ab3ff7212d8b8e
@@ -777,7 +777,7 @@ impl GlyphRasterizer {
GlyphRasterResult::Bitmap(glyph) => {
assert_eq!((glyph.left.fract(), glyph.top.fract()), (0.0, 0.0));
let mut texture_cache_handle = TextureCacheHandle::new();
texture_cache.request(&mut texture_cache_handle, gpu_cache);
texture_cache.request(&texture_cache_handle, gpu_cache);
texture_cache.update(
&mut texture_cache_handle,
ImageDescriptor {
@@ -932,7 +932,7 @@ impl RenderTaskCache {
});

// Check if this texture cache handle is valid.
if texture_cache.request(&mut cache_entry.handle, gpu_cache) {
if texture_cache.request(&cache_entry.handle, gpu_cache) {
// Invoke user closure to get render task chain
// to draw this into the texture cache.
let (render_task_id, is_opaque) = try!(f(render_tasks));
@@ -597,7 +597,7 @@ impl ResourceCache {
};

let needs_upload = self.texture_cache
.request(&mut entry.as_mut().unwrap().texture_cache_handle, gpu_cache);
.request(&entry.as_ref().unwrap().texture_cache_handle, gpu_cache);

if !needs_upload && !needs_update {
return;
@@ -858,7 +858,7 @@ impl ResourceCache {
debug_assert_eq!(self.state, State::Idle);
self.state = State::AddResources;
self.texture_cache.begin_frame(frame_id);
self.cached_glyphs.begin_frame(&mut self.texture_cache, &self.cached_render_tasks);
self.cached_glyphs.begin_frame(&self.texture_cache, &self.cached_render_tasks);
self.cached_render_tasks.begin_frame(&mut self.texture_cache);
self.current_frame_id = frame_id;
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.