mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared/*_cursor_view] CursorView inherits from TransparentView
so that CursorView tells its superview to redrawn in the background, except the RoundCursorView.
This commit is contained in:
committed by
LeaNumworks
parent
ed98218e7b
commit
8337e36f46
@@ -1,11 +1,11 @@
|
||||
#ifndef SHARED_CURSOR_VIEW_H
|
||||
#define SHARED_CURSOR_VIEW_H
|
||||
|
||||
#include <escher.h>
|
||||
#include <escher/transparent_view.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
class CursorView : public View {
|
||||
class CursorView : public TransparentView {
|
||||
public:
|
||||
virtual void setCursorFrame(KDRect frame, bool force) { View::setFrame(frame, force); }
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
|
||||
@@ -49,6 +49,10 @@ void RoundCursorView::setCursorFrame(KDRect f, bool force) {
|
||||
CursorView::setCursorFrame(f, force);
|
||||
}
|
||||
|
||||
void RoundCursorView::markRectAsDirty(KDRect rect) {
|
||||
View::markRectAsDirty(rect);
|
||||
}
|
||||
|
||||
#ifdef GRAPH_CURSOR_SPEEDUP
|
||||
bool RoundCursorView::eraseCursorIfPossible() {
|
||||
if (!m_underneathPixelBufferLoaded) {
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
void resetMemoization() const { m_underneathPixelBufferLoaded = false; }
|
||||
#endif
|
||||
private:
|
||||
void markRectAsDirty(KDRect rect) override;
|
||||
#ifdef GRAPH_CURSOR_SPEEDUP
|
||||
bool eraseCursorIfPossible();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user