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

Issue 1863053002: cc: Encapsulate rastering related data in RasteringInfo.

Created:
4 years, 8 months ago by prashant.n
Modified:
4 years, 8 months ago
Reviewers:
reveman, vmpstr, ericrk
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@refactor_one_copy
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Encapsulate rastering related data in RasteringInfo. This patches adds new struct which encapsulates all rastering related information. So all the functions that need rastering related data, the single variable is passed to use data from. BUG=599863 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -70 lines) Patch
M cc/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/cc.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
A cc/raster/rastering_info.h View 1 chunk +88 lines, -0 lines 0 comments Download
A cc/raster/rastering_info.cc View 1 chunk +72 lines, -0 lines 0 comments Download
M cc/tiles/tile_manager.cc View 4 chunks +31 lines, -70 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 8 (2 generated)
prashant.n
wip - do let me know your kind opinion. I'll modify in patchset2 all the ...
4 years, 8 months ago (2016-04-06 10:41:08 UTC) #3
reveman
I'm failing to see the benefit of this. RasterTaskImpl is already an appropriate place to ...
4 years, 8 months ago (2016-04-06 12:07:39 UTC) #4
prashant.n
On 2016/04/06 12:07:39, reveman wrote: > I'm failing to see the benefit of this. RasterTaskImpl ...
4 years, 8 months ago (2016-04-06 14:26:46 UTC) #5
prashant.n
> 2. Make all functions which are getting called on worker, not to return any ...
4 years, 8 months ago (2016-04-06 14:34:09 UTC) #6
vmpstr
On 2016/04/06 14:26:46, prashant.n wrote: > On 2016/04/06 12:07:39, reveman wrote: > > I'm failing ...
4 years, 8 months ago (2016-04-06 18:03:25 UTC) #7
prashant.n
4 years, 8 months ago (2016-04-06 22:33:27 UTC) #8
> Can you elaborate on the second point a little bit? Maybe that will make it
> clear why this is a good change.

For avoiding indirection we can store the members in RaterTaskImpl itself and
send that as an argument.

2nd point is RasterTaskImpl itself maintains all the states, modifications than
locals in functions being called in RunOnWorkerThread().

e.g. In case of one copy,

RunOnWorkerThread() {
raster_buffer_->Playback(this);
}

RasterBufferImpl::Playback(RasterTaskImpl* rt) {
worker_pool_->PlaybackAndCopyOnWorkerThread(resource_, &lock_, rt);
}

This way it will simplify passing of rastering info further deep in calls,
saving number of arguments being sent in a function call. This way
RasterTaskImpl itself will maintain state of all variables.

Then it becomes easier to encapsulate those in a closure and in future have
these closures splitted (multiple work items) if needed. So in
RunOnWorkerThread(), it can execute work items sequentially to get the needed
job done by Task.

Powered by Google App Engine
This is Rietveld 408576698