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

Issue 7058035: WebGraphicsContext3DCommandBufferImpl cleanup, Canvas2D thottling fix, GpuScheduler fix. (Closed)

Created:
9 years, 6 months ago by jbates
Modified:
9 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, apatrick_chromium, Vangelis Kokkevis, nduca
Visibility:
Public.

Description

WebGraphicsContext3DCommandBufferImpl cleanup: - Removed unused methods deleteCompositorTexture and createCompositorTexture. - Removed redundant method copyTextureToCompositor. Canvas2D thottling fix: - Removed throttling, because it assumed only one canvas, but there are N canvases calling CopyTextureToParentTexture. - Flush isn't necessary, because the caller was already flushing (DrawingBufferChromium.cpp). - We will need a followup bug fix in WebKit that will throttle setInterval/setTimeout dirtying of SharedGraphicsContext. Similar to how WebGL is throttled. (http://code.google.com/p/chromium/issues/detail?id=84781) GpuScheduler fix: - Ganesh generates a lot of cheap GL commands, so 100 commands were executing in 50us, causing us to spin on PostTask(ProcessCommands) 60+ times per frame. This change simply tracks the elapsed time after each 100 commands - if the time is less than 2ms, it continues on to the next 100 commands. (These are independent changes - could be split up if necessary.) BUG=83628 TEST=trace FishIE demo with 500 fish, check that ProcessCommands is not called ~60 times per frame.

Patch Set 1 #

Total comments: 4

Patch Set 2 : tests and feedback #

Total comments: 6

Patch Set 3 : feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -58 lines) Patch
M content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h View 1 chunk +0 lines, -5 lines 0 comments Download
M content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc View 3 chunks +3 lines, -18 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M gpu/command_buffer/service/gpu_scheduler.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gpu_scheduler.cc View 1 2 5 chunks +43 lines, -25 lines 0 comments Download
M gpu/command_buffer/service/gpu_scheduler_unittest.cc View 1 2 3 chunks +4 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/mocks.h View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/mocks.cc View 1 2 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
jbates
Three changes here, if it's too much I can split them up.
9 years, 6 months ago (2011-06-02 22:02:49 UTC) #1
apatrick_chromium
http://codereview.chromium.org/7058035/diff/1/gpu/command_buffer/service/gpu_scheduler.cc File gpu/command_buffer/service/gpu_scheduler.cc (right): http://codereview.chromium.org/7058035/diff/1/gpu/command_buffer/service/gpu_scheduler.cc#newcode183 gpu/command_buffer/service/gpu_scheduler.cc:183: base::TimeTicks start_time = base::TimeTicks::Now(); Does this have sufficient precision ...
9 years, 6 months ago (2011-06-02 22:07:43 UTC) #2
piman
LGTM with Al's observations.
9 years, 6 months ago (2011-06-02 22:41:02 UTC) #3
jbates
The latest CL also updates a gpu_scheduler test to trigger a break from ProcessCommands loop ...
9 years, 6 months ago (2011-06-03 00:05:55 UTC) #4
apatrick_chromium
http://codereview.chromium.org/7058035/diff/1007/gpu/command_buffer/service/mocks.cc File gpu/command_buffer/service/mocks.cc (right): http://codereview.chromium.org/7058035/diff/1007/gpu/command_buffer/service/mocks.cc#newcode28 gpu/command_buffer/service/mocks.cc:28: SpecializedAsyncAPIMock::SpecializedAsyncAPIMock() {} The name does not describe what the ...
9 years, 6 months ago (2011-06-03 18:58:52 UTC) #5
jamesr
My preference is always to break patches like this up, especially since we'll want to ...
9 years, 6 months ago (2011-06-03 19:09:32 UTC) #6
jbates
9 years, 6 months ago (2011-06-03 21:27:32 UTC) #7
This issue has been split into the following three:
http://codereview.chromium.org/7024027/
http://codereview.chromium.org/7024028/
http://codereview.chromium.org/6993032

I'm not sure the Canvas throttling removal change is ready for M13 without
webkit-side throttling implemented. It needs testing regarding DOS issues, etc.

http://codereview.chromium.org/7058035/diff/1007/gpu/command_buffer/service/g...
File gpu/command_buffer/service/gpu_scheduler_unittest.cc (right):

http://codereview.chromium.org/7058035/diff/1007/gpu/command_buffer/service/g...
gpu/command_buffer/service/gpu_scheduler_unittest.cc:47: async_api_.reset(new
StrictMock<SpecializedAsyncAPIMock>);
On 2011/06/03 19:09:32, jamesr wrote:
> what's so special about this mock?  in what way is it more specialized than
any
> other mock?

Isn't that similar to asking in what way is the AsyncAPI class Async? You have
to look at its definition to find out in both cases :P It is a specialized
subclass of the mock: it overrides the method that the mock provides and
specializes it. Anyway, I made the class name longer since this tripped up both
reviewers.

http://codereview.chromium.org/7058035/diff/1007/gpu/command_buffer/service/m...
File gpu/command_buffer/service/mocks.cc (right):

http://codereview.chromium.org/7058035/diff/1007/gpu/command_buffer/service/m...
gpu/command_buffer/service/mocks.cc:28:
SpecializedAsyncAPIMock::SpecializedAsyncAPIMock() {}
On 2011/06/03 18:58:52, apatrick_chromium wrote:
> The name does not describe what the specialized mock does. How about
> SlowAsyncAPIMock or something?

Done. But not Slow, because it is still a generic class used for all tests. It's
just that it has specialized the DoCommand method for specific command behavior.

http://codereview.chromium.org/7058035/diff/1007/gpu/command_buffer/service/m...
gpu/command_buffer/service/mocks.cc:37: base::PlatformThread::Sleep(3);
On 2011/06/03 18:58:52, apatrick_chromium wrote:
> I fear this is going to make the test flaky if the timer precision is not
> sufficient. How about a loop that calls base::TimeTicks::Now to verify that
the
> required amount of time has elapsed and sleep again if it has not.

Done.

Powered by Google App Engine
This is Rietveld 408576698