Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9901419

Browse files
csnewmandvc94ch
authored andcommitted
Fix formatting
1 parent80bca7a commit9901419

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

‎flutter-engine/src/ffi.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
use flutter_engine_sys::{
2-
FlutterPlatformMessage,FlutterPlatformMessageResponseHandle,
3-
};
1+
use flutter_engine_sys::{FlutterPlatformMessage,FlutterPlatformMessageResponseHandle};
42
use log::error;
53
use std::borrow::Cow;
64
use std::ffi::{CStr,CString};
@@ -172,4 +170,4 @@ impl From<FlutterPointerMouseButtons> for flutter_engine_sys::FlutterPointerMous
172170
}
173171
}
174172
}
175-
}
173+
}

‎flutter-engine/src/texture_registry.rs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
usecrate::FlutterEngine;
2+
use flutter_engine_sys::FlutterOpenGLTexture;
23
#[cfg(feature ="image")]
34
use image::RgbaImage;
45
use parking_lot::Mutex;
56
use std::collections::HashMap;
6-
use std::sync::Arc;
7-
use std::sync::atomic::{AtomicI64,Ordering};
8-
use flutter_engine_sys::FlutterOpenGLTexture;
97
use std::os::raw::c_void;
8+
use std::sync::atomic::{AtomicI64,Ordering};
9+
use std::sync::Arc;
1010

1111
pub(crate)structTextureRegistry{
1212
last_id:AtomicI64,
@@ -41,12 +41,15 @@ impl TextureRegistry {
4141
}
4242
}
4343

44-
pubfnget_texture_frame(&self,texture_id:TextureId,_size:(usize,usize)) ->Option<TextureFrame>{
44+
pubfnget_texture_frame(
45+
&self,
46+
texture_id:TextureId,
47+
_size:(usize,usize),
48+
) ->Option<TextureFrame>{
4549
self.frames.lock().remove(&texture_id)
4650
}
4751
}
4852

49-
5053
pubtypeTextureId =i64;
5154

5255
pubstructTexture{
@@ -100,10 +103,8 @@ impl Texture {
100103
let engine_weak = engine.downgrade();
101104
let frame =TextureFrame::new(gl::TEXTURE_2D, glid, gl::RGBA,move ||{
102105
ifletSome(engine) = engine_weak.upgrade(){
103-
engine.run_on_render_thread(move |_|{
104-
unsafe{
105-
gl::DeleteTextures(1,&glidas*const_);
106-
}
106+
engine.run_on_render_thread(move |_|unsafe{
107+
gl::DeleteTextures(1,&glidas*const_);
107108
});
108109
}
109110
});
@@ -113,7 +114,12 @@ impl Texture {
113114
}
114115
}
115116

116-
fnpost_frame_internal(engine:&FlutterEngine,texture_id:TextureId,frames:&Arc<Mutex<HashMap<TextureId,TextureFrame>>>,frame:TextureFrame){
117+
fnpost_frame_internal(
118+
engine:&FlutterEngine,
119+
texture_id:TextureId,
120+
frames:&Arc<Mutex<HashMap<TextureId,TextureFrame>>>,
121+
frame:TextureFrame,
122+
){
117123
frames.lock().insert(texture_id, frame);
118124

119125
let texture_id = texture_id;
@@ -153,14 +159,9 @@ pub struct TextureFrame {
153159
}
154160

155161
implTextureFrame{
156-
pubfnnew<F>(
157-
target:u32,
158-
name:u32,
159-
format:u32,
160-
destruction_callback:F,
161-
) ->TextureFrame
162-
where
163-
F:FnOnce() ->() +'static +Send,
162+
pubfnnew<F>(target:u32,name:u32,format:u32,destruction_callback:F) ->TextureFrame
163+
where
164+
F:FnOnce() ->() +'static +Send,
164165
{
165166
Self{
166167
target,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp