Skip to content

Commit 3732554

Browse files
committed
Address review comments
1 parent 947da9f commit 3732554

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

editor/src/messages/layout/utility_types/widgets/input_widgets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl<'a> serde::Deserialize<'a> for CheckboxId {
7979
D: serde::Deserializer<'a>,
8080
{
8181
let optional_id: Option<u64> = Option::deserialize(deserializer)?;
82-
// let id = u64::deserialize(deserializer)?;
82+
// TODO: This is potentially weird because after deserialization the two labels will be decoupled if the value not existent
8383
let id = optional_id.unwrap_or(0);
8484
let checkbox_id = CheckboxId(OnceCell::new().into());
8585
checkbox_id.0.set(id).map_err(serde::de::Error::custom)?;

node-graph/gapplication-io/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ impl Size for web_sys::HtmlCanvasElement {
4949
}
5050
}
5151

52-
#[derive(Debug, Clone, serde::Serialize)]
52+
#[derive(Debug, Clone)]
5353
pub struct ImageTexture {
54-
#[serde(skip)]
5554
#[cfg(feature = "wgpu")]
5655
pub texture: Arc<wgpu::Texture>,
57-
#[serde(skip)]
5856
#[cfg(not(feature = "wgpu"))]
5957
pub texture: (),
6058
}

node-graph/graph-craft/src/document/value.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,12 @@ pub struct RenderOutput {
429429
#[derive(Debug, Clone, Hash, PartialEq, dyn_any::DynAny, serde::Serialize, serde::Deserialize)]
430430
pub enum RenderOutputType {
431431
CanvasFrame(SurfaceFrame),
432+
#[serde(skip)]
432433
Texture(ImageTexture),
433-
Svg { svg: String, image_data: Vec<(u64, Image<Color>)> },
434+
Svg {
435+
svg: String,
436+
image_data: Vec<(u64, Image<Color>)>,
437+
},
434438
Image(Vec<u8>),
435439
}
436440

node-graph/graph-craft/src/wasm_application_io.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ impl WasmApplicationIo {
137137
let wgpu_available = executor.is_some();
138138
WGPU_AVAILABLE.store(wgpu_available as i8, Ordering::SeqCst);
139139

140-
// Always enable wgpu when running with Tauri
141140
let mut io = Self {
142141
#[cfg(target_arch = "wasm32")]
143142
ids: AtomicU64::new(0),
@@ -162,11 +161,7 @@ impl WasmApplicationIo {
162161
let wgpu_available = executor.is_some();
163162
WGPU_AVAILABLE.store(wgpu_available as i8, Ordering::SeqCst);
164163

165-
// Always enable wgpu when running with Tauri
166164
let mut io = Self {
167-
#[cfg(target_arch = "wasm32")]
168-
ids: AtomicU64::new(0),
169-
#[cfg(feature = "wgpu")]
170165
gpu_executor: executor,
171166
windows: Vec::new(),
172167
resources: HashMap::new(),

node-graph/wgpu-executor/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ impl WgpuExecutor {
238238
let vello_renderer = Renderer::new(
239239
&context.device,
240240
RendererOptions {
241-
// surface_format: Some(wgpu::TextureFormat::Rgba8Unorm),
242241
pipeline_cache: None,
243242
use_cpu: false,
244243
antialiasing_support: AaSupport::all(),

0 commit comments

Comments
 (0)