Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Issue 10274009: GpuMemoryManager should limit memory allocations based on viewport size for android. (Closed)

Created:
8 years, 7 months ago by mmocny
Modified:
8 years, 7 months ago
Reviewers:
nduca, jonathan.backer
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Visibility:
Public.

Description

GpuMemoryManager should limit memory allocations based on viewport size for android. On android, we identify devices with low system memory via viewport size. WK ContentTextureManager previously used viewport size information to select texture allocation limits. Now that GpuMemoryManager is assigning these limits, that logic needed to move here. BUG=123382 TEST=content_unittest.GpuMemoryManagerTest and Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135351

Patch Set 1 #

Patch Set 2 : Bonus allocations need not be split on android. Its a single number based on size. #

Total comments: 4

Patch Set 3 : Adding const #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -4 lines) Patch
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_memory_manager.cc View 1 2 2 chunks +31 lines, -4 lines 0 comments Download
M content/common/gpu/gpu_memory_manager_unittest.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
mmocny
This fixes the android regression of not handing out allocations based on viewport size. https://chromiumcodereview.appspot.com/10274009/diff/2001/content/common/gpu/image_transport_surface.cc ...
8 years, 7 months ago (2012-05-03 15:00:12 UTC) #1
jonathan.backer
LGTM https://chromiumcodereview.appspot.com/10274009/diff/2001/content/common/gpu/gpu_memory_manager.cc File content/common/gpu/gpu_memory_manager.cc (right): https://chromiumcodereview.appspot.com/10274009/diff/2001/content/common/gpu/gpu_memory_manager.cc#newcode32 content/common/gpu/gpu_memory_manager.cc:32: unsigned int componentsPerPixel = 4; // GraphicsContext3D::RGBA const ...
8 years, 7 months ago (2012-05-04 14:25:27 UTC) #2
mmocny
https://chromiumcodereview.appspot.com/10274009/diff/2001/content/common/gpu/image_transport_surface.cc File content/common/gpu/image_transport_surface.cc (right): https://chromiumcodereview.appspot.com/10274009/diff/2001/content/common/gpu/image_transport_surface.cc#newcode228 content/common/gpu/image_transport_surface.cc:228: manager_->gpu_memory_manager()->ScheduleManage(); Good point! Actually the size of the chrome ...
8 years, 7 months ago (2012-05-04 14:37:21 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10274009/8001
8 years, 7 months ago (2012-05-04 14:39:11 UTC) #4
commit-bot: I haz the power
Change committed as 135351
8 years, 7 months ago (2012-05-04 15:40:15 UTC) #5
nilesh
On 2012/05/04 15:40:15, I haz the power (commit-bot) wrote: > Change committed as 135351 Looks ...
8 years, 7 months ago (2012-05-07 18:47:11 UTC) #6
mmocny
Ah yes, the upper limit is hard coded and lower and android. The bug is ...
8 years, 7 months ago (2012-05-07 19:06:44 UTC) #7
mmocny
8 years, 7 months ago (2012-05-07 19:16:01 UTC) #8
Filed https://code.google.com/p/chromium/issues/detail?id=126521
On 2012/05/07 19:06:44, mmocny wrote:
> Ah yes, the upper limit is hard coded and lower and android.
> 
> The bug is in the TEST not the code.  I can update.
> 
> On 2012/05/07 18:47:11, nileshagrawal1 wrote:
> > On 2012/05/04 15:40:15, I haz the power (commit-bot) wrote:
> > > Change committed as 135351
> > 
> > Looks like this CL causes
> > GpuMemoryManagerTest.TestForegroundStubsGetBonusAllocation to fail on
android.
> > 
> > --------------------
> > Expected: (stub1.allocation_.gpu_resource_size_in_bytes) >
> > (static_cast<size_t>(GpuMemoryManager::kMinimumAllocationForTab)), actual:
> > 33554432 vs 33554432
> > 
> > 
> > content/common/gpu/gpu_memory_manager_unittest.cc:503: Failure
> > 
> > 
> > Expected: (stub2.allocation_.gpu_resource_size_in_bytes) >
> > (static_cast<size_t>(GpuMemoryManager::kMinimumAllocationForTab)), actual:
> > 33554432 vs 33554432
> > 
> > 
> > content/common/gpu/gpu_memory_manager_unittest.cc:505: Failure
> > 
> > 
> > Expected: (stub3.allocation_.gpu_resource_size_in_bytes) >
> > (static_cast<size_t>(GpuMemoryManager::kMinimumAllocationForTab)), actual:
> > 33554432 vs 33554432

Powered by Google App Engine
This is Rietveld 408576698