[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:
Ruben Dashyan
2020-03-04 14:48:20 +01:00
committed by LeaNumworks
parent ed98218e7b
commit 8337e36f46
3 changed files with 7 additions and 2 deletions

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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