Merge pull request #15922 from SimonWalton-HiFi/min_threadpool_2

BUGZ-993: Bump minimum threadpool size to 2
This commit is contained in:
Shannon Romano 2019-08-09 09:20:55 -07:00 committed by GitHub
commit 1993ff6277
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -292,7 +292,7 @@ static const uint32_t MAX_CONCURRENT_RESOURCE_DOWNLOADS = 4;
// For processing on QThreadPool, we target a number of threads after reserving some
// based on how many are being consumed by the application and the display plugin. However,
// we will never drop below the 'min' value
static const int MIN_PROCESSING_THREAD_POOL_SIZE = 1;
static const int MIN_PROCESSING_THREAD_POOL_SIZE = 2;
static const QString SNAPSHOT_EXTENSION = ".jpg";
static const QString JPG_EXTENSION = ".jpg";

View file

@ -78,7 +78,8 @@ public:
void setVsyncEnabled(bool vsyncEnabled) { _vsyncEnabled = vsyncEnabled; }
bool isVsyncEnabled() const { return _vsyncEnabled; }
// Three threads, one for rendering, one for texture transfers, one reserved for the GL driver
int getRequiredThreadCount() const override { return 3; }
// Drop to one reserved for better other-task performance in desktop
int getRequiredThreadCount() const override { return 1; }
virtual std::function<void(gpu::Batch&, const gpu::TexturePointer&)> getHUDOperator() override;
void copyTextureToQuickFramebuffer(NetworkTexturePointer source,

View file

@ -53,6 +53,8 @@ public:
void updateVisionSqueezeParameters(float visionSqueezeX, float visionSqueezeY, float visionSqueezeTransition,
int visionSqueezePerEye, float visionSqueezeGroundPlaneY,
float visionSqueezeSpotlightSize);
// Attempt to reserve two threads.
int getRequiredThreadCount() const override { return 2; }
signals:
void hmdMountedChanged();