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

Issue 2613903002: The great shader refactor: Move all programs to a common cache (Closed)

Created:
3 years, 11 months ago by ccameron
Modified:
3 years, 11 months ago
Reviewers:
enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

The great shader refactor: Move all programs to a common cache The various programs stored in GLRenderer are 5-dimensional arrays, and adding color conversion to them would require adding a 6th dimension. Create a ProgramKey structure that uniquely identifies a program, and create a single unordered_map to cache programs. Gut all off the GLRenderer::Get*Program* functions, to just call a common GLRenderer::GetProgram function, which takes this key. Adding color conversion will now just consist of adding a new field to the ProgramKey structure. Before we do that, we'll remove all of the (now-stub) GLRenderer::Get*Program* functions, and have the callers all call GLRenderer::GetProgram. BUG=667966 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2613903002 Cr-Commit-Position: refs/heads/master@{#443362} Committed: https://chromium.googlesource.com/chromium/src/+/4183067b5afba105939fef7dbd4082295ad2791f

Patch Set 1 #

Total comments: 6

Patch Set 2 : Delete vars #

Total comments: 1

Patch Set 3 : Rebase #

Total comments: 2

Patch Set 4 : Incorporate review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -1036 lines) Patch
M cc/output/gl_renderer.h View 1 2 3 2 chunks +35 lines, -118 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 8 chunks +63 lines, -314 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 1 chunk +44 lines, -54 lines 0 comments Download
M cc/output/program_binding.h View 1 4 chunks +19 lines, -4 lines 0 comments Download
M cc/output/shader.h View 1 3 chunks +0 lines, -546 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 23 (15 generated)
ccameron
Continuing to rain destruction... https://codereview.chromium.org/2613903002/diff/1/cc/output/gl_renderer.h File cc/output/gl_renderer.h (left): https://codereview.chromium.org/2613903002/diff/1/cc/output/gl_renderer.h#oldcode397 cc/output/gl_renderer.h:397: Avoiding adding another dimension to ...
3 years, 11 months ago (2017-01-05 10:32:27 UTC) #3
enne (OOO)
https://codereview.chromium.org/2613903002/diff/1/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/2613903002/diff/1/cc/output/gl_renderer.cc#newcode1329 cc/output/gl_renderer.cc:1329: const Program* program = GetProgram(ProgramKey::RenderPass( This cleanup is great. ...
3 years, 11 months ago (2017-01-09 19:46:49 UTC) #4
ccameron
Updated (now with a working dependency patch) https://codereview.chromium.org/2613903002/diff/1/cc/output/gl_renderer.h File cc/output/gl_renderer.h (right): https://codereview.chromium.org/2613903002/diff/1/cc/output/gl_renderer.h#newcode402 cc/output/gl_renderer.h:402: std::unordered_map<ProgramKey, Program*, ...
3 years, 11 months ago (2017-01-11 09:46:40 UTC) #8
enne (OOO)
lgtm https://codereview.chromium.org/2613903002/diff/40001/cc/output/gl_renderer.h File cc/output/gl_renderer.h (right): https://codereview.chromium.org/2613903002/diff/40001/cc/output/gl_renderer.h#newcode331 cc/output/gl_renderer.h:331: const Program* GetProgramForTesting(const ProgramKey& key) const; I hate ...
3 years, 11 months ago (2017-01-12 18:29:12 UTC) #15
ccameron
Thanks! https://codereview.chromium.org/2613903002/diff/40001/cc/output/gl_renderer.h File cc/output/gl_renderer.h (right): https://codereview.chromium.org/2613903002/diff/40001/cc/output/gl_renderer.h#newcode331 cc/output/gl_renderer.h:331: const Program* GetProgramForTesting(const ProgramKey& key) const; On 2017/01/12 ...
3 years, 11 months ago (2017-01-12 20:26:05 UTC) #16
ccameron
Thanks!
3 years, 11 months ago (2017-01-12 20:26:06 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2613903002/60001
3 years, 11 months ago (2017-01-12 20:26:52 UTC) #20
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 21:25:33 UTC) #23
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/4183067b5afba105939fef7dbd40...

Powered by Google App Engine
This is Rietveld 408576698