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

Unbreak publishing #303

Merged
merged 4 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android-example/app/src/main/assets/blit.fs.glsl
2 changes: 1 addition & 1 deletion android-example/app/src/main/assets/check.fs.glsl
2 changes: 1 addition & 1 deletion android-example/app/src/main/assets/grid.fs.glsl
2 changes: 1 addition & 1 deletion android-example/app/src/main/assets/quad.vs.glsl
2 changes: 1 addition & 1 deletion android-example/app/src/main/assets/tri.fs.glsl
2 changes: 1 addition & 1 deletion android-example/app/src/main/assets/tri.vs.glsl
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping to add a working symlink for this library but couldn't complete a build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I can look into this separately. I'll merge this PR for now to allow publishing of the crate.

This file was deleted.

7 changes: 4 additions & 3 deletions android-example/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
name = "surfman_android_threads"
version = "0.1.0"
authors = ["Patrick Walton <pcwalton@mimiga.net>"]
edition = "2018"
edition = "2021"

[lib]
name = "main"
crate_type = ["cdylib"]
crate-type = ["cdylib"]

[profile.dev]
panic = "abort"
Expand All @@ -21,7 +21,8 @@ gl = "0.14"
jni = "0.21"
log = "0.4"
surfman = { version = "0.9.4", features = [ "sm-test" ] }
winit = { version = "0.29.10", features = [ "android-native-activity", "rwh_05" ] }
winit = { version = "0.29.10", features = [ "android-native-activity", "rwh_06" ] }
rwh_06 = { package = "raw-window-handle", version = "0.6" }

[patch.crates-io]
surfman = { path = "../../" }
4 changes: 2 additions & 2 deletions android-example/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ use log::Level;
use std::cell::{Cell, RefCell};
use std::mem;
use std::thread::{self, JoinHandle};
use surfman::platform::android::tests;
use surfman::platform::egl::tests;
use surfman::{Connection, NativeContext, NativeDevice};

#[path = "../../../surfman/examples/threads.rs"]
#[path = "../../../examples/threads.rs"]
mod threads;

thread_local! {
Expand Down
3 changes: 2 additions & 1 deletion examples/chaos_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use euclid::default::Point2D;
use rand::{self, Rng};
use surfman::{SurfaceAccess, SurfaceType};
use winit::dpi::PhysicalSize;
use winit::event::{DeviceEvent, Event, KeyboardInput, VirtualKeyCode, WindowEvent};
use winit::event::WindowEvent::KeyboardInput;
use winit::event::{DeviceEvent, Event, WindowEvent};
use winit::event_loop::{ControlFlow, EventLoop};
use winit::window::WindowBuilder;

Expand Down
29 changes: 15 additions & 14 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use crate::{ContextAttributeFlags, ContextAttributes, Error, GLApi, GLVersion, G
use crate::{SurfaceType, WindowingApiError};

use euclid::default::Size2D;
#[cfg(not(feature = "sm-test"))]
use serial_test::serial;
use std::os::raw::c_void;
use std::sync::mpsc;
Expand All @@ -40,7 +41,7 @@ static GL_ES_VERSIONS: [GLVersion; 4] = [
];

#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_adapter_creation() {
let connection = Connection::new().unwrap();
connection.create_hardware_adapter().unwrap();
Expand All @@ -49,7 +50,7 @@ pub fn test_adapter_creation() {
}

#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_device_creation() {
let connection = Connection::new().unwrap();
let adapter = connection
Expand All @@ -65,7 +66,7 @@ pub fn test_device_creation() {
}

#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_device_accessors() {
let connection = Connection::new().unwrap();
let adapter = connection.create_low_power_adapter().unwrap();
Expand All @@ -84,7 +85,7 @@ pub fn test_device_accessors() {
// Tests that all combinations of flags result in the creation of valid context descriptors and
// contexts.
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_context_creation() {
let connection = Connection::new().unwrap();
let adapter = connection
Expand Down Expand Up @@ -164,7 +165,7 @@ pub fn test_context_creation() {

// Tests that newly-created contexts are not immediately made current (issue #7).
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_newly_created_contexts_are_not_current() {
let connection = Connection::new().unwrap();
let adapter = connection
Expand Down Expand Up @@ -233,7 +234,7 @@ pub fn test_newly_created_contexts_are_not_current() {

// Tests a simple case of one context being shared with another.
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_context_sharing() {
let connection = Connection::new().unwrap();
let adapter = connection
Expand Down Expand Up @@ -274,7 +275,7 @@ pub fn test_context_sharing() {

// Tests that generic surfaces can be created.
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_generic_surface_creation() {
let connection = Connection::new().unwrap();
let adapter = connection
Expand Down Expand Up @@ -343,7 +344,7 @@ pub fn test_generic_surface_creation() {

// Tests that basic GL commands work.
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_gl() {
let mut env = match BasicEnvironment::new() {
None => return,
Expand Down Expand Up @@ -437,7 +438,7 @@ pub fn test_gl() {
}

#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_surface_texture_blit_framebuffer() {
let mut env = match BasicEnvironment::new() {
None => return,
Expand Down Expand Up @@ -504,7 +505,7 @@ pub fn test_surface_texture_blit_framebuffer() {
}

#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_cross_device_surface_texture_blit_framebuffer() {
let mut env = match BasicEnvironment::new() {
None => return,
Expand Down Expand Up @@ -575,7 +576,7 @@ pub fn test_cross_device_surface_texture_blit_framebuffer() {
}

#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_cross_thread_surface_texture_blit_framebuffer() {
let mut env = match BasicEnvironment::new() {
None => return,
Expand Down Expand Up @@ -661,7 +662,7 @@ pub fn test_cross_thread_surface_texture_blit_framebuffer() {

// Tests that surface textures are not upside-down.
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_surface_texture_right_side_up() {
let mut env = match BasicEnvironment::new() {
None => return,
Expand Down Expand Up @@ -734,7 +735,7 @@ pub fn test_surface_texture_right_side_up() {

#[cfg(not(any(target_os = "android", target_env = "ohos")))]
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_depth_and_stencil() {
let connection = Connection::new().unwrap();
let adapter = connection
Expand Down Expand Up @@ -856,7 +857,7 @@ pub fn test_depth_and_stencil() {
// Make sure that the current native context can be fetched and that they can be correctly wrapped
// in `surfman` contexts.
#[cfg_attr(not(feature = "sm-test"), test)]
#[serial]
#[cfg_attr(not(feature = "sm-test"), serial)]
pub fn test_get_native_context() {
let mut env = match BasicEnvironment::new() {
None => return,
Expand Down