策略抽离
This commit is contained in:
+3
-1
@@ -5,6 +5,8 @@
|
||||
#include "Core/architecture/Render_Time.h"
|
||||
#include "Core/base/global.h"
|
||||
#include "Core/plottable/export.h"
|
||||
#include "Core/plot/Plot_Core_Access.h"
|
||||
#include "Core/architecture/Plot_Render_Context.h"
|
||||
#include <QPainter>
|
||||
#include <QPointer>
|
||||
#include <QResizeEvent>
|
||||
@@ -134,7 +136,7 @@ void Abs_Plot_Private::paint_event(Abs_Plot* plot, QPaintEvent* event) {
|
||||
auto performance_snapshot = performance_overlay_snapshot(*core);
|
||||
if (performance_snapshot && !performance_snapshot->image.empty()) {
|
||||
Size current_size = core->viewport_size();
|
||||
auto ctx = core->render_context();
|
||||
auto ctx = Plot_Core_Context_Access::render_context(*core);
|
||||
std::uint64_t current_viewport_version = ctx ? ctx->viewport_version.load(std::memory_order_acquire) : 0;
|
||||
if (performance_snapshot->viewport_size == current_size && performance_snapshot->viewport_version == current_viewport_version) {
|
||||
QImage overlay = Qt_Image_Adapter::to_qimage(performance_snapshot->image.view());
|
||||
|
||||
Reference in New Issue
Block a user