Re: BitmapScopedWriteAccess

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

 





On Tue, 14 Jan 2025 at 22:32, Chris Sherlock <chris.sherlock79@xxxxxxxxx> wrote:
Thanks, that is helpful but I still don’t understand why, when it is a scoped instance with RAII semantics, we need to run reset manually after we’ve finished using it.

So in the case of

   commit 44dfcebde64b9edfa9f50eace34e5e1497ab9314
   Author: Michael Weghorn <m.weghorn@xxxxxxxxx>
   Date:   Tue Jan 14 05:59:31 2025 +0100
    Revert "vcl: remove unnecessary resets"

The problem is this line of code after the reset() calls:

  m_aLastResult = BitmapEx(aContent, aAlpha);

And that line of code will assert if there are any currently active BitmapWriteAccess objects.

So the BitmapWriteAccess objects have to be cleared/reset before the copy can happen.

    

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux