Skip to content

Instantly share code, notes, and snippets.

@njpatel
Created August 17, 2012 11:23
Show Gist options
  • Save njpatel/3378123 to your computer and use it in GitHub Desktop.
Save njpatel/3378123 to your computer and use it in GitHub Desktop.
Fixes drawing of previews
=== modified file 'dash/DashView.cpp'
--- dash/DashView.cpp 2012-08-16 14:38:33 +0000
+++ dash/DashView.cpp 2012-08-16 22:12:13 +0000
@@ -381,13 +381,6 @@
void DashView::Draw(nux::GraphicsEngine& gfx_context, bool force_draw)
{
renderer_.DrawFull(gfx_context, content_geo_, GetAbsoluteGeometry(), GetGeometry());
-
- // we only do this because the previews don't redraw correctly right now, so we have to force
- // a full redraw every frame. performance sucks but we'll fix it post FF
- if (preview_displaying_)
- {
- preview_container_->ProcessDraw(gfx_context, true);
- }
}
void DashView::DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw)
@@ -400,7 +393,7 @@
if (preview_displaying_)
{
// disabled until the draw cycle in previews can be improved
- preview_container_->ProcessDraw(gfx_context, force_draw);
+ preview_container_->ProcessDraw(gfx_context, IsFullRedraw());
}
else
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment