Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More rename from GPU thread to raster thread #17408

Merged
merged 6 commits into from Mar 31, 2020

Conversation

liyuqian
Copy link
Contributor

This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor #17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename shell/gpu to shell/raster yet. It should be optional but I think it's better to have raster_surface_software.cc than gpu_surface_software.cc.

GPUTaskRunner -> RasterTaskRunner
gpu_task_runner -> raster_task_runner
gpu_thread -> raster_thread
GpuThread -> RasterThread

(These include filename changes)
@auto-assign auto-assign bot requested a review from chinmaygarde March 31, 2020 00:32
@liyuqian liyuqian added Work in progress (WIP) Not ready (yet) for review! and removed cla: yes labels Mar 31, 2020
@liyuqian liyuqian changed the title [wip] More rename from GPU thread to raster thread More rename from GPU thread to raster thread Mar 31, 2020
Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I marked the outdated comments I noticed. I am sure there are others but we can update those those as we notice them. Let's land this ASAP to prevent merge conflicts for a patch of this surface area.

// threads are the same, should_post_gpu_task will be false, and then instead
// of posting a task to the raster thread, the ui thread just signals the
// latch and the platform/raster thread follows with executing gpu_task.
bool should_post_gpu_task = task_runners_.GetRasterTaskRunner() !=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing var update.

@@ -721,24 +721,24 @@ void Shell::OnPlatformViewDestroyed() {
// gpu_task to the raster thread triggers signaling the latch(on the IO
// thread). If the GPU the and platform threads are the same this results in a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment uses the old names still.

// the GPU and platform threads. Reduces the lease term by 1.
GpuThreadStatus DecrementLease();
// Returns |RasterThreadStatus::kUnmergedNow| if this call resulted in
// splitting the GPU and platform threads. Reduces the lease term by 1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated thread name in comment.

@@ -190,7 +190,7 @@ SceneHost::SceneHost(fml::RefPtr<zircon::dart::Handle> viewHolderToken,

// Pass the raw handle to the GPU thead; destroying a |zircon::dart::Handle|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated thread name in comment.

@@ -117,7 +117,7 @@ Dart_Handle Picture::RasterizeToImage(sk_sp<SkPicture> picture,

// Kick things off on the GPU.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"on the raster task runner"

@@ -721,24 +721,24 @@ void Shell::OnPlatformViewDestroyed() {
// gpu_task to the raster thread triggers signaling the latch(on the IO
// thread). If the GPU the and platform threads are the same this results in a
// deadlock as the gpu_task will never be posted to the plaform/raster thread
// that is blocked on a latch. To avoid the described deadlock, if the gpu
// that is blocked on a latch. To avoid the described deadlock, if the raster
// and the platform threads are the same, should_post_gpu_task will be false,
// and then instead of posting a task to the raster thread, the ui thread just
// signals the latch and the platform/raster thread follows with executing
// gpu_task.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raster_task

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice -- agreed with Chinmay; you may want to merge sooner rather than later to avoid conflicts, then land a cleanup.

@liyuqian
Copy link
Contributor Author

Thanks! I'll merge this as is to avoid conflict, and address Chinmay's comment in another PR.

@liyuqian liyuqian merged commit 807ca85 into flutter:master Mar 31, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 31, 2020
@liyuqian liyuqian deleted the gpu_raster_rename branch April 3, 2020 00:31
goderbauer pushed a commit to goderbauer/engine that referenced this pull request Apr 16, 2020
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor flutter#17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Work in progress (WIP) Not ready (yet) for review!
Projects
None yet
4 participants