Closed Bug 805907 Opened 12 years ago Closed 11 years ago

Handle memory pressure notification in the TileStore

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(1 file, 4 obsolete files)

      No description provided.
Attached patch patch (obsolete) — Splinter Review
This is almost done. It just doesn't find the right layer. Have to catch a bus but it just needs 2 minutes of work + testing:

adb shell am broadcast -a org.mozilla.gecko.FORCE_MEMORY_PRESSURE
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attached patch patch (obsolete) — Splinter Review
This will recreate the tile store on a memory pressure.
Attachment #675681 - Attachment is obsolete: true
Attachment #676228 - Flags: review?(chrislord.net)
Comment on attachment 676228 [details] [diff] [review]
patch

Review of attachment 676228 [details] [diff] [review]:
-----------------------------------------------------------------

I'm not sure I'm the best person to review this, but I don't see anything obviously wrong. If you're confident about this, take my r+, but if you want a more thorough review I'd recommend seeking out someone that knows this kind of code a bit better.

Interested to hear the answer for my two nits though, especially the second.

::: gfx/layers/ipc/CompositorChild.cpp
@@ +16,5 @@
>  namespace mozilla {
>  namespace layers {
>  
> +// Observer for the memory-pressure notification, to trigger
> +// flushing of the shaped-word caches

The shaped-word caches? I don't know what this means, which indicates to me that it might be worth getting someone that knows this kind of code better to review this section. Unless this is a copy-paste error, in which case my review may be fine.

::: gfx/layers/ipc/CompositorParent.cpp
@@ +236,5 @@
> +{
> +  if (!mLayerManager)
> +    return true;
> +
> +  Layer* layer = mLayerManager->GetPrimaryScrollableLayer();

Could we not just send it to the root layer in case here?
Attachment #676228 - Flags: review?(chrislord.net) → review+
The first is in fact a copy and paste mistake. Are you just not comfortable with the observer code? I can ask Ehsan to look at that.
Attached patch patch (obsolete) — Splinter Review
Can you take a look at the event observer Ehsan?
Attachment #676228 - Attachment is obsolete: true
Attachment #676250 - Flags: review?(ehsan)
Comment on attachment 676250 [details] [diff] [review]
patch

Review of attachment 676250 [details] [diff] [review]:
-----------------------------------------------------------------

r+ on the observer stuff with the below nits fixed.

::: gfx/layers/ipc/CompositorChild.cpp
@@ +24,5 @@
> +public:
> +  NS_DECL_ISUPPORTS
> +  NS_DECL_NSIOBSERVER
> +
> +  MemoryPressureObserver(CompositorChild* cc)

Nit: explicit, please.

::: gfx/layers/ipc/CompositorChild.h
@@ +53,5 @@
>    { return false; }
>  
>  private:
>    nsRefPtr<LayerManager> mLayerManager;
> +  nsRefPtr<nsIObserver> mMemoryPressureObserver;

nsCOMPtr please.
Attachment #676250 - Flags: review?(ehsan) → review+
Attached patch patch to land (obsolete) — Splinter Review
Attachment #676250 - Attachment is obsolete: true
Attachment #676345 - Flags: review+
Attached patch patch to landSplinter Review
Attachment #676345 - Attachment is obsolete: true
Attachment #676349 - Flags: review+
Attachment #676349 - Flags: checkin+
This got merged. Looks like my comment was bad.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: