Remove the (now obsolete) logic for clearing the first pixels of line zero.

This commit is contained in:
Christian Speckner 2017-10-12 00:10:36 +02:00
parent 23c2901d14
commit d0da98aef9
6 changed files with 9 additions and 40 deletions

View File

@ -12,5 +12,9 @@
"editor.trimAutoWhitespace": true, "editor.trimAutoWhitespace": true,
"editor.useTabStops": false, "editor.useTabStops": false,
"C_Cpp.intelliSenseEngine": "Default", "C_Cpp.intelliSenseEngine": "Default",
"files.insertFinalNewline": true "files.insertFinalNewline": true,
"files.associations": {
"locale": "cpp",
"string": "cpp"
}
} }

View File

@ -108,9 +108,6 @@ void TIA::setFrameManager(AbstractFrameManager *frameManager)
}, },
[this] () { [this] () {
onFrameComplete(); onFrameComplete();
},
[this] () {
onRenderingStart();
} }
); );
@ -1134,12 +1131,6 @@ void TIA::onFrameStart()
} }
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::onRenderingStart()
{
myXAtRenderingStart = myHctr > 68 ? myHctr - 68 : 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::onFrameComplete() void TIA::onFrameComplete()
{ {

View File

@ -461,12 +461,6 @@ class TIA : public Device
*/ */
void onFrameStart(); void onFrameStart();
/**
* This callback is invoked by FrameManager when the visible range of the
* current frame starts.
*/
void onRenderingStart();
/** /**
* This callback is invoked by FrameManager when the current frame completes. * This callback is invoked by FrameManager when the current frame completes.
*/ */

View File

@ -21,8 +21,7 @@
AbstractFrameManager::AbstractFrameManager() : AbstractFrameManager::AbstractFrameManager() :
myLayout(FrameLayout::pal), myLayout(FrameLayout::pal),
myOnFrameStart(nullptr), myOnFrameStart(nullptr),
myOnFrameComplete(nullptr), myOnFrameComplete(nullptr)
myOnRenderingStart(nullptr)
{ {
layout(FrameLayout::ntsc); layout(FrameLayout::ntsc);
reset(); reset();
@ -55,18 +54,16 @@ void AbstractFrameManager::nextLine()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void AbstractFrameManager::setHandlers( void AbstractFrameManager::setHandlers(
callback frameStartCallback, callback frameStartCallback,
callback frameCompletionCallback, callback frameCompletionCallback
callback renderingStartCallback
) { ) {
myOnFrameStart = frameStartCallback; myOnFrameStart = frameStartCallback;
myOnFrameComplete = frameCompletionCallback; myOnFrameComplete = frameCompletionCallback;
myOnRenderingStart = renderingStartCallback;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void AbstractFrameManager::clearHandlers() void AbstractFrameManager::clearHandlers()
{ {
myOnFrameStart = myOnFrameComplete = myOnRenderingStart = nullptr; myOnFrameStart = myOnFrameComplete = nullptr;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -109,12 +106,6 @@ void AbstractFrameManager::notifyFrameComplete()
myCurrentFrameFinalLines; myCurrentFrameFinalLines;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void AbstractFrameManager::notifyRenderingStart()
{
if (myOnRenderingStart) myOnRenderingStart();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void AbstractFrameManager::layout(FrameLayout layout) void AbstractFrameManager::layout(FrameLayout layout)
{ {

View File

@ -40,8 +40,7 @@ class AbstractFrameManager : public Serializable
*/ */
void setHandlers( void setHandlers(
callback frameStartCallback, callback frameStartCallback,
callback frameCompletionCallback, callback frameCompletionCallback
callback renderingStartCallback
); );
/** /**
@ -250,14 +249,6 @@ class AbstractFrameManager : public Serializable
*/ */
void notifyFrameComplete(); void notifyFrameComplete();
/**
* Signal rendering start. Mandatory only of actual rendering happens.
*
* TODO: This (and the related handling in the TIA) should be unnecessary
* after refactoring.
*/
void notifyRenderingStart();
/** /**
* The internal setter to update the frame layout. * The internal setter to update the frame layout.
*/ */
@ -317,7 +308,6 @@ class AbstractFrameManager : public Serializable
*/ */
callback myOnFrameStart; callback myOnFrameStart;
callback myOnFrameComplete; callback myOnFrameComplete;
callback myOnRenderingStart;
private: private:

View File

@ -165,7 +165,6 @@ void FrameManager::setState(FrameManager::State state)
break; break;
case State::frame: case State::frame:
notifyRenderingStart();
myVsyncLines = 0; myVsyncLines = 0;
myY = 0; myY = 0;
break; break;