mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-28 16:41:52 +00:00
Bug 875246 - Ensure that UpdateTexture DispatchImageClientUpdate only dispatches if not in the ImageBridge thread. r=kchen
DispatchImageClientUpdate is a helper function to dispatch IPC message, only dispatch when not in the ImageBridge thread can improve responsibility.
This commit is contained in:
parent
6b3c44841d
commit
c45c440206
@ -310,6 +310,10 @@ static void UpdateImageClientNow(ImageClient* aClient, ImageContainer* aContaine
|
||||
void ImageBridgeChild::DispatchImageClientUpdate(ImageClient* aClient,
|
||||
ImageContainer* aContainer)
|
||||
{
|
||||
if (InImageBridgeChildThread()) {
|
||||
UpdateImageClientNow(aClient, aContainer);
|
||||
return;
|
||||
}
|
||||
sImageBridgeChildSingleton->GetMessageLoop()->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableFunction(&UpdateImageClientNow, aClient, aContainer));
|
||||
|
Loading…
x
Reference in New Issue
Block a user