Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up DPE's color picker handling by 2-3x and disallow redundant updates #17493

Merged

Conversation

alexmontAmazon
Copy link
Contributor

What does this PR do?

  • verify in UpdateDomContents that the value is changing before blindly issuing a patch operation
  • fix ColorGrid to do its color update all at once, instead of emitting partial (incorrect) intermediate colors twice as often
  • add ColorController::setHSV method to more efficiently set the color and respond to the new ColorGrid functionality
  • rewrite ComponentAdapter's refresh mechanism to delay any updates to next frame and skip any redundant intermediate updates along the way

How was this PR tested?

Please describe any testing performed.

loop

Signed-off-by: Alex Montgomery <alexmont@amazon.com>
Signed-off-by: Alex Montgomery <alexmont@amazon.com>
…ateOptimizations

Signed-off-by: Alex Montgomery <alexmont@amazon.com>
@gadams3
Copy link
Contributor

gadams3 commented Feb 9, 2024

Please test this thoroughly with DPE disabled or material editor, material instance editor, and other RPE and non-DPE use cases. With material editor and material instance editor, please make sure that colors are applied while continuously dragging color or other sliders in the color picker.

@alexmontAmazon
Copy link
Contributor Author

I'll happily test in the material instance editor, but yeah, I did test in the RPE Inspector and it's still applying the colors continuously on drag and performing better than ever

@alexmontAmazon
Copy link
Contributor Author

@gadams3
yep! Works in RPE mode:
RPEColorPicker

@alexmontAmazon alexmontAmazon merged commit e6fe438 into o3de:development Feb 12, 2024
3 checks passed
alexmontAmazon added a commit to alexmontAmazon/o3de that referenced this pull request Feb 22, 2024
…pdates (o3de#17493)

* queue refresh in singleshot to keep it from happening more than once a
loop

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* doubled the color picker performance

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

---------

Signed-off-by: Alex Montgomery <alexmont@amazon.com>
alexmontAmazon added a commit that referenced this pull request Feb 23, 2024
* handle dynamic container elements (#17411)

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* re-enable recycling, esp for prefab override labels (#17343)

* re-enable recycling, esp for prefab override labels

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* addressed PR feedback

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* forcing immediate deletion to satisfy tests

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* try Qt's shared pointers instead

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

---------

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* fix element add for containers with DynamicElementType (#17441)

* handle dynamic container elements

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* not quite working dynamic add

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* container dynamic add works

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

---------

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* Handle ClassElement::FLG_POINTER in DPE-based Inspector (#17457)

* handle dynamic container elements

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* not quite working dynamic add

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* container dynamic add works

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* implemented baseclass container element addition

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* Update Code/Framework/AzFramework/AzFramework/DocumentPropertyEditor/ReflectionAdapter.cpp

Co-authored-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
Signed-off-by: Alex Montgomery <alexmont@amazon.com>

---------

Signed-off-by: Alex Montgomery <alexmont@amazon.com>
Co-authored-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>

* Speed up DPE's color picker handling by 2-3x and disallow redundant updates (#17493)

* queue refresh in singleshot to keep it from happening more than once a
loop

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* doubled the color picker performance

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

---------

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* added recycling capability to several common handlers (#17512)

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

* fix unused assert

Signed-off-by: Alex Montgomery <alexmont@amazon.com>

---------

Signed-off-by: Alex Montgomery <alexmont@amazon.com>
Co-authored-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants