Summary: | [GStreamer] cache video dimensions | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Philippe Normand <pnormand> | ||||||
Component: | Platform | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | eric.carlson, feature-media-reviews, gustavo, menard, mrobinson, pnormand, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Philippe Normand
2012-07-07 18:03:57 PDT
Created attachment 151151 [details]
Patch
Comment on attachment 151151 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151151&action=review The logic is a bit hard to follow here. Perhaps you could do this: 1. naturalSize() would be responsible for caching. m_videoSize. 2. In notifyPlayerOfVideo when you want to invalidate the cached video size simply do: m_videoSize = IntSize(); and then let naturalSize() initialize m_videoSize lazily. (In reply to comment #2) > (From update of attachment 151151 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=151151&action=review > > The logic is a bit hard to follow here. Perhaps you could do this: > > 1. naturalSize() would be responsible for caching. m_videoSize. That's not possible unfortunately because naturalSize() is const :/ > 2. In notifyPlayerOfVideo when you want to invalidate the cached video size simply do: > > m_videoSize = IntSize(); > That I can do yes! :) (In reply to comment #3) > That's not possible unfortunately because naturalSize() is const :/ In these situations, I typically just make the cache member mutable. Created attachment 151153 [details]
Patch
Committed r122187: <http://trac.webkit.org/changeset/122187> |