summaryrefslogtreecommitdiff
path: root/src/render_hint.rs
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2023-10-11 08:21:10 +1300
committerBen Bridle <bridle.benjamin@gmail.com>2023-10-11 08:21:10 +1300
commit8e08d723ff7a853f2b10dc0f1408911d5801cea8 (patch)
tree50efd2967e93f8bc1009f242a405ec18335f0aa6 /src/render_hint.rs
parenta6e97019bd53e4478c846f8f636c18ecb53bece2 (diff)
downloadphosphor-8e08d723ff7a853f2b10dc0f1408911d5801cea8.zip
Rewrite phosphor
This has been a long-awaited task, the code has been accumulating small changes for a while now. This commit consolidates all these changes in order to make the code more readable and maintainable for the future. Notable changes: - Remove the concept of a ProgramController - Remove all of the dead OpenGL stub code - Update winit to version 28.1, from 27.4 - Use softbuffer for writing pixels to the native display server
Diffstat (limited to 'src/render_hint.rs')
-rw-r--r--src/render_hint.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/render_hint.rs b/src/render_hint.rs
deleted file mode 100644
index e4d37c3..0000000
--- a/src/render_hint.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-use std::ops::*;
-
-/// A hint to tell a window controller whether the previous render state is
-/// intact and can be updated, or was destroyed and needs to be fully redrawn.
-#[derive(Clone, Copy, Debug, PartialEq, Eq)]
-pub enum RenderHint {
- /// The buffer contents are intact, only updates need to be drawn.
- Update,
- /// The buffer contents were destroyed, a full redraw is required.
- Redraw,
-}
-
-impl RenderHint {
- pub fn is_update(&self) -> bool { *self == RenderHint::Update }
- pub fn is_redraw(&self) -> bool { *self == RenderHint::Redraw }
-}
-
-impl BitAnd for RenderHint {
- type Output = RenderHint;
- fn bitand(self, other: RenderHint) -> Self::Output {
- if self == RenderHint::Redraw || other == RenderHint::Redraw {
- RenderHint::Redraw
- } else {
- RenderHint::Update
- }
- }
-}
-
-impl BitAndAssign for RenderHint {
- fn bitand_assign(&mut self, other: RenderHint) {
- *self = *self & other;
- }
-}