Closed
Bug 181829
Opened 22 years ago
Closed 22 years ago
imgContainerGIF doesn't need to implement imgIDecoderObserver
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
People
(Reporter: paper, Assigned: paper)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Biesinger
:
review+
tor
:
superreview+
|
Details | Diff | Splinter Review |
imgContainerGIF currently implements only one function of imgIDecoderObserver ..
OnDataAvailable(..).
nsGIFDecoder2 sends OnDataAvailable calls when it has image data ready.
imgRequest::OnDataAvailable gets them and calls imgContainerGIF::OnDataAvailable
before firing off OnDataAvailable of the other observers in order to ensure the
composited frame is current.
Instead of nsGIFDecoder2 going in a round about way to get to imgContainerGIF,
nsGIFDecoder2 could just call a function in imgContainerGIF directly. It
already has a reference to the imgContainerGIF object.
So the steps to "fix" this "bug" are:
1) Create a public function in imgContainerGIF to handle new frame data. Call it
NewFrameData(..), move code from imgContainerGIF::OnDataAvailable(..) to it.
2) remove imgIDecoderObserver from imgContainerGIF
3) Where nsGIFDecoder2 calls OnDataAvailable, make it call NewFrameData first
Unfortunately, we can't remove the call in imgRequest::OnDataAvailable to
imgIContainer::OnDataAvailable, because we don't know if any other classes
inheriting from imgIContainer require being called (perhaps imgContainerART does)
I don't really think this will effect performance, but it will make
imgContainerGIF more readable.
Comment 1•22 years ago
|
||
>we don't know if any other classes
>inheriting from imgIContainer require being called (perhaps imgContainerART does)
well, you could check on that (ART) and if it doesn't require it, remove it...
Assignee | ||
Comment 2•22 years ago
|
||
imgContainerART doesn't implement imgIDecoderObserver (from what I've been
told), so I removed that call in imgRequest as well as what I said in Comment
#0.
Assignee | ||
Comment 3•22 years ago
|
||
Now with NS_STATIC_CAST(NS_STATIC_CAST())
Attachment #107826 -
Attachment is obsolete: true
Assignee | ||
Comment 4•22 years ago
|
||
Comment on attachment 108080 [details] [diff] [review]
remove imgIDecoderObserver
I've been told that imgContainerART doesn't implement imgIDecoderObserver, so
code removal in imgRequest is okay. :)
Attachment #108080 -
Flags: review?(cbiesinger)
Updated•22 years ago
|
Attachment #108080 -
Flags: review?(cbiesinger) → review+
Comment on attachment 108080 [details] [diff] [review]
remove imgIDecoderObserver
sr=tor
Attachment #108080 -
Flags: superreview+
Assignee | ||
Comment 6•22 years ago
|
||
Checking in src/imgRequest.cpp;
/cvsroot/mozilla/modules/libpr0n/src/imgRequest.cpp,v <-- imgRequest.cpp
new revision: 1.72; previous revision: 1.71
done
Checking in decoders/gif/imgContainerGIF.cpp;
/cvsroot/mozilla/modules/libpr0n/decoders/gif/imgContainerGIF.cpp,v <--
imgContainerGIF.cpp
new revision: 1.8; previous revision: 1.7
done
Checking in decoders/gif/imgContainerGIF.h;
/cvsroot/mozilla/modules/libpr0n/decoders/gif/imgContainerGIF.h,v <--
imgContainerGIF.h
new revision: 1.4; previous revision: 1.3
done
Checking in decoders/gif/nsGIFDecoder2.cpp;
/cvsroot/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp,v <--
nsGIFDecoder2.cpp
new revision: 1.41; previous revision: 1.40
done
Checking in decoders/gif/nsGIFDecoder2.h;
/cvsroot/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.h,v <--
nsGIFDecoder2.h
new revision: 1.21; previous revision: 1.20
done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•