Re: KernelShark not rendering correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Steven,

I managed the reproduce a similar behavior by saving a session at one screen resolution then changing the resolution and reopening the session. Not sure if you did the same. Attached is a patch that fixes the bug for me. Please test it and tell me if it also fixes the bug for you.

Thanks!
Yordan



On 23.04.19 г. 17:41 ч., Steven Rostedt wrote:
Hi Yordan,

To test your zoom patch, I opened my old json file that I sent you, but
noticed that it comes up without the right dimensions for the graph.

Here's a screenshot:

   http://rostedt.homelinux.com/private/ks-off.png

If I resize the window it will eventually go back to normal. But I
figured I'd let you take a look. I'm guessing it has something to do
with the saved json file was for a smaller window than the one that
opened it.

-- Steve

diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 5f326f5..39bc7b5 100644
--- a/kernel-shark/src/KsMainWindow.cpp
+++ b/kernel-shark/src/KsMainWindow.cpp
@@ -433,7 +433,6 @@ QString KsMainWindow::lastSessionFile()
 void KsMainWindow::_restoreSession()
 {
 	loadSession(lastSessionFile());
-	_graph.updateGeom();
 }
 
 void KsMainWindow::_importSession()
@@ -448,7 +447,6 @@ void KsMainWindow::_importSession()
 		return;
 
 	loadSession(fileName);
-	_graph.updateGeom();
 }
 
 void KsMainWindow::_updateSession()
@@ -1098,6 +1096,7 @@ void KsMainWindow::loadSession(const QString &fileName)
 
 	_session.loadTable(&_view);
 	_colorPhaseSlider.setValue(_session.getColorScheme() * 100);
+	_graph.updateGeom();
 }
 
 void KsMainWindow::_initCapture()
diff --git a/kernel-shark/src/KsTraceGraph.cpp b/kernel-shark/src/KsTraceGraph.cpp
index 6087e96..598ef70 100644
--- a/kernel-shark/src/KsTraceGraph.cpp
+++ b/kernel-shark/src/KsTraceGraph.cpp
@@ -538,6 +538,8 @@ void KsTraceGraph::updateGeom()
 			       * allow the scroll bar to disappear when the
 			       * widget is extended to maximum.
 			       */
+
+	_glWindow.resizeGL(_glWindow.width(), _glWindow.height());
 }
 
 void KsTraceGraph::_updateGraphLegends()

[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux