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

Issue 2303023002: Avoid making the shared main thread context if we won't use it. (Closed)

Created:
4 years, 3 months ago by danakj
Modified:
4 years, 3 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2840
Project:
chromium
Visibility:
Public.

Description

Avoid making the shared main thread context if we won't use it. When deciding if HTMLCanvasElement should be accelerated we changed the code to get the shared main thread context before making the decision because it's part of the decision. However, for most of the things we decide on (such as are-we-using-display-list-canvas) we don't care about the context. We only care once we decide we do want to use it, then verify it's not using swiftshader. So, defer getting/creating the shared main thread context until we know we want to accelerate, then just fail to accelerate if swiftshader. To make this logic more clear, I split the createImageBufferSurface() method into createAcceleratedImageBufferSurface() and createSoftwareImageBufferSurface() which is used if the former fails/returns null. There is less nesting now so hopefully that's nice. With this the memory.blink_memory_mobile's TheVerge case goes from 6422Kb of gpu memory back down to 4324Kb. TBR=junov@chromium.org, kbr@chromium.org BUG=640811, 606056 Review-Url: https://codereview.chromium.org/2280723003 Cr-Commit-Position: refs/heads/master@{#414806} (cherry picked from commit 03fe53dc4730038b5d13613fcbad10fc9a204c54) Committed: https://chromium.googlesource.com/chromium/src/+/29e2540ac9bf025bb174d55543b7596e550920cd

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -37 lines) Patch
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 5 chunks +47 lines, -35 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
danakj
4 years, 3 months ago (2016-09-01 21:18:16 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
29e2540ac9bf025bb174d55543b7596e550920cd.

Powered by Google App Engine
This is Rietveld 408576698