From 0d8f82a5f9401f0bbba9e37e89714d2d779090c8 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 9 May 2016 22:35:12 -0400 Subject: [PATCH] Revert "Clear the display when tearing down the decoder. This closes #50" This reverts commit 68aecaeed5139c8d6ad4f4a0cda4b60bd3c1b94f. --- moonlight.hpp | 1 - viddec.cpp | 9 --------- 2 files changed, 10 deletions(-) diff --git a/moonlight.hpp b/moonlight.hpp index dad64d6..ae38338 100644 --- a/moonlight.hpp +++ b/moonlight.hpp @@ -116,7 +116,6 @@ class MoonlightInstance : public pp::Instance, public pp::MouseLock { void PaintFinished(int32_t result); void DispatchGetPicture(uint32_t unused); - void DispatchClearDisplay(uint32_t unused); void PictureReady(int32_t result, PP_VideoPicture picture); void PaintPicture(void); void InitializeRenderingSurface(int width, int height); diff --git a/viddec.cpp b/viddec.cpp index 3d5ad02..f6194eb 100644 --- a/viddec.cpp +++ b/viddec.cpp @@ -143,11 +143,6 @@ void MoonlightInstance::VidDecSetup(int videoFormat, int width, int height, int g_Instance->m_CallbackFactory.NewCallback(&MoonlightInstance::DispatchGetPicture)); } -void MoonlightInstance::DispatchClearDisplay(uint32_t unused) { - glClear(GL_COLOR_BUFFER_BIT); - g_Instance->m_Graphics3D.SwapBuffers(pp::BlockUntilComplete()); -} - void MoonlightInstance::DispatchGetPicture(uint32_t unused) { // Queue the initial GetPicture callback on the main thread g_Instance->m_VideoDecoder->GetPicture( @@ -161,10 +156,6 @@ void MoonlightInstance::VidDecCleanup(void) { g_Instance->m_VideoDecoder->Flush(pp::BlockUntilComplete()); delete g_Instance->m_VideoDecoder; - // Clear the current contents of the display - pp::Module::Get()->core()->CallOnMainThread(0, - g_Instance->m_CallbackFactory.NewCallback(&MoonlightInstance::DispatchClearDisplay)); - if (g_Instance->m_Texture2DShader.program) { glDeleteProgram(g_Instance->m_Texture2DShader.program); g_Instance->m_Texture2DShader.program = 0;