Skip to content

Commit

Permalink
fix: rm useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
zeromake committed Mar 19, 2023
1 parent d5be945 commit 183d114
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions wiliwili/include/view/mpv_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ class MPVCore : public brls::Singleton<MPVCore> {
private:
mpv_handle *mpv = nullptr;
mpv_render_context *mpv_context = nullptr;
brls::Rect reportRect;
brls::RepeatingTimer reportTimer;
void setFrameSizeInline();
#ifdef MPV_SW_RENDER
const int PIXCEL_SIZE = 4;
int nvg_image = 0;
Expand Down
11 changes: 0 additions & 11 deletions wiliwili/source/view/mpv_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,6 @@ void MPVCore::deleteShader() {
}

void MPVCore::initializeGL() {
reportTimer.setCallback([&]() {
this->setFrameSizeInline();
});
#if defined(MPV_NO_FB) || defined(MPV_SW_RENDER)
#else
if (media_framebuffer != 0) return;
Expand Down Expand Up @@ -394,15 +391,7 @@ void MPVCore::command_async(const char **args) {
check_error(mpv_command_async(mpv, 0, args));
}


void MPVCore::setFrameSize(brls::Rect rect) {
this->reportRect = rect;
reportTimer.stop();
reportTimer.start(150);
}

void MPVCore::setFrameSizeInline() {
brls::Rect rect = this->reportRect;
#ifdef MPV_SW_RENDER
// 使用 dx11 的拷贝交换,否则视频渲染异常
const static int mpvImageFlags = NVG_IMAGE_STREAMING|NVG_IMAGE_COPY_SWAP;
Expand Down

0 comments on commit 183d114

Please sign in to comment.