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

Issue 364193004: Reopened: Caching the result of readPixelsSupported (Closed)

Created:
6 years, 5 months ago by Rémi Piotaix
Modified:
6 years, 2 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Caching the result of readPixelsSupported The call was calling GR_GL_GetIntegerv 2 times for each readPixels and thus was causing a loss of performance (resubmit of issue 344793008) Benchmark url: http://packages.gkny.fr/tst/index.html BUG=skia:2681 Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c Committed: https://skia.googlesource.com/skia/+/8339371f1ec3c57a0741932fd96bff32c53d4e54 Committed: https://skia.googlesource.com/skia/+/e4b231428e8c14cbc82d20cfb12eb08fc45f8df6

Patch Set 1 #

Total comments: 4

Patch Set 2 : Reimplemented caching system #

Patch Set 3 : Fixed bug #

Total comments: 9

Patch Set 4 : Corrections #

Total comments: 25

Patch Set 5 : Correcting code as suggested in the comments #

Total comments: 2

Patch Set 6 : Using SkTDynamicHash::Iter #

Patch Set 7 : Adding tests for SkTHashCache #

Patch Set 8 : Error in the test... #

Patch Set 9 : Rebase (merge) to master #

Total comments: 14

Patch Set 10 : Correcting code as suggested in comments #

Total comments: 8

Patch Set 11 : Again #

Patch Set 12 : Typo in one filename #

Patch Set 13 : Rebase master #

Patch Set 14 : Rebase master #

Patch Set 15 : Correcting build #

Patch Set 16 : Rebase master #

Patch Set 17 : Again #

Patch Set 18 : Fix bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -12 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M gyp/tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
A src/core/SkTHashCache.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +77 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLCaps.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +48 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +26 lines, -4 lines 0 comments Download
M src/gpu/gl/GrGpuGL.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +8 lines, -6 lines 0 comments Download
A tests/THashCache.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +91 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (3 generated)
Rémi Piotaix
PTAL (again)
6 years, 5 months ago (2014-07-03 13:36:00 UTC) #1
Justin Novosad
On 2014/07/03 13:36:00, Rémi Piotaix wrote: > PTAL (again) lgtm
6 years, 5 months ago (2014-07-03 13:38:24 UTC) #2
Justin Novosad
The CQ bit was checked by junov@chromium.org
6 years, 5 months ago (2014-07-03 13:38:28 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/piotaixr@chromium.org/364193004/1
6 years, 5 months ago (2014-07-03 13:39:30 UTC) #4
commit-bot: I haz the power
Change committed as 753a2964afe5661ce9b2a8ca77ca9d0aabd3173c
6 years, 5 months ago (2014-07-03 13:50:56 UTC) #5
reed2
A revert of this CL has been created in https://codereview.chromium.org/367323003/ by reed@chromium.org. The reason for ...
6 years, 5 months ago (2014-07-03 14:53:37 UTC) #6
Justin Novosad
https://codereview.chromium.org/364193004/diff/1/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/364193004/diff/1/src/gpu/gl/GrGLCaps.cpp#newcode582 src/gpu/gl/GrGLCaps.cpp:582: if (cachedValue == NULL) { Skia style: if (NULL ...
6 years, 5 months ago (2014-07-03 15:43:51 UTC) #7
Rémi Piotaix
Still breaking tests ... https://codereview.chromium.org/364193004/diff/1/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/364193004/diff/1/src/gpu/gl/GrGLCaps.cpp#newcode582 src/gpu/gl/GrGLCaps.cpp:582: if (cachedValue == NULL) { ...
6 years, 5 months ago (2014-07-03 17:48:10 UTC) #8
Rémi Piotaix
Comparison from the first patchset: - The bug was in CrGpuGl:188 Instead of using the ...
6 years, 5 months ago (2014-07-03 18:39:59 UTC) #9
Justin Novosad
https://codereview.chromium.org/364193004/diff/40001/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/364193004/diff/40001/src/gpu/gl/GrGLCaps.cpp#newcode586 src/gpu/gl/GrGLCaps.cpp:586: ReadPixelsSupportedFormats newElement = ReadPixelsSupportedFormats(key, value); Should be: ReadPixelsSupportedFormats newElement(key, ...
6 years, 5 months ago (2014-07-03 18:57:45 UTC) #10
Rémi Piotaix
https://codereview.chromium.org/364193004/diff/40001/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/364193004/diff/40001/src/gpu/gl/GrGLCaps.cpp#newcode586 src/gpu/gl/GrGLCaps.cpp:586: ReadPixelsSupportedFormats newElement = ReadPixelsSupportedFormats(key, value); On 2014/07/03 18:57:44, junov ...
6 years, 5 months ago (2014-07-03 20:38:28 UTC) #11
Justin Novosad
https://codereview.chromium.org/364193004/diff/40001/src/gpu/gl/GrGLCaps.h File src/gpu/gl/GrGLCaps.h (right): https://codereview.chromium.org/364193004/diff/40001/src/gpu/gl/GrGLCaps.h#newcode450 src/gpu/gl/GrGLCaps.h:450: mutable DynamicHashCache<ReadPixelsSupportedFormats, ReadPixelsSupportedFormatsKey> fReadPixelsSupportedCache; On 2014/07/03 20:38:27, Rémi Piotaix ...
6 years, 5 months ago (2014-07-04 14:42:27 UTC) #12
bsalomon
https://codereview.chromium.org/364193004/diff/60001/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/364193004/diff/60001/src/gpu/gl/GrGLCaps.cpp#newcode59 src/gpu/gl/GrGLCaps.cpp:59: GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) { Shouldn't we copy ...
6 years, 5 months ago (2014-07-07 13:31:10 UTC) #13
mtklein
https://codereview.chromium.org/364193004/diff/60001/src/gpu/gl/GrGLCaps.h File src/gpu/gl/GrGLCaps.h (right): https://codereview.chromium.org/364193004/diff/60001/src/gpu/gl/GrGLCaps.h#newcode407 src/gpu/gl/GrGLCaps.h:407: class DynamicHashCache { On 2014/07/07 13:31:10, bsalomon wrote: > ...
6 years, 5 months ago (2014-07-07 13:44:30 UTC) #14
Rémi Piotaix
https://codereview.chromium.org/364193004/diff/60001/src/gpu/gl/GrGLCaps.cpp File src/gpu/gl/GrGLCaps.cpp (right): https://codereview.chromium.org/364193004/diff/60001/src/gpu/gl/GrGLCaps.cpp#newcode59 src/gpu/gl/GrGLCaps.cpp:59: GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) { On 2014/07/07 13:31:10, ...
6 years, 5 months ago (2014-07-07 18:10:17 UTC) #15
mtklein
https://codereview.chromium.org/364193004/diff/80001/src/core/SkTHashCache.h File src/core/SkTHashCache.h (right): https://codereview.chromium.org/364193004/diff/80001/src/core/SkTHashCache.h#newcode71 src/core/SkTHashCache.h:71: SkTDArray<T*> fValues; On 2014/07/07 18:10:17, Rémi Piotaix wrote: > ...
6 years, 5 months ago (2014-07-07 18:33:27 UTC) #16
Rémi Piotaix
On 2014/07/07 18:33:27, mtklein wrote: > https://codereview.chromium.org/364193004/diff/80001/src/core/SkTHashCache.h > File src/core/SkTHashCache.h (right): > > https://codereview.chromium.org/364193004/diff/80001/src/core/SkTHashCache.h#newcode71 > ...
6 years, 5 months ago (2014-07-07 18:36:48 UTC) #17
Justin Novosad
On 2014/07/07 18:36:48, Rémi Piotaix wrote: > On 2014/07/07 18:33:27, mtklein wrote: > > https://codereview.chromium.org/364193004/diff/80001/src/core/SkTHashCache.h ...
6 years, 5 months ago (2014-07-07 18:41:41 UTC) #18
mtklein
> How about an unrefAll method? Yeah, users can make unrefAll(), deleteAll(), refAll(), whatever out ...
6 years, 5 months ago (2014-07-07 18:44:11 UTC) #19
Rémi Piotaix
On 2014/07/07 18:44:11, mtklein wrote: > > How about an unrefAll method? > > Yeah, ...
6 years, 5 months ago (2014-07-07 20:33:50 UTC) #20
Rémi Piotaix
On 2014/07/07 20:33:50, Rémi Piotaix wrote: > On 2014/07/07 18:44:11, mtklein wrote: > > > ...
6 years, 5 months ago (2014-07-11 16:58:34 UTC) #21
mtklein
https://codereview.chromium.org/364193004/diff/160001/src/core/SkTHashCache.h File src/core/SkTHashCache.h (right): https://codereview.chromium.org/364193004/diff/160001/src/core/SkTHashCache.h#newcode22 src/core/SkTHashCache.h:22: SkTHashCache() { Consider this: SkTHashCache { this->reset(); } ~SkTHashCache ...
6 years, 5 months ago (2014-07-11 17:08:08 UTC) #22
Rémi Piotaix
https://codereview.chromium.org/364193004/diff/160001/src/core/SkTHashCache.h File src/core/SkTHashCache.h (right): https://codereview.chromium.org/364193004/diff/160001/src/core/SkTHashCache.h#newcode22 src/core/SkTHashCache.h:22: SkTHashCache() { On 2014/07/11 17:08:08, mtklein wrote: > Consider ...
6 years, 5 months ago (2014-07-11 17:45:01 UTC) #23
mtklein
https://codereview.chromium.org/364193004/diff/180001/src/core/SkTHashCache.h File src/core/SkTHashCache.h (right): https://codereview.chromium.org/364193004/diff/180001/src/core/SkTHashCache.h#newcode30 src/core/SkTHashCache.h:30: bool has(const Key& key) const { This appears to ...
6 years, 5 months ago (2014-07-11 18:11:39 UTC) #24
Rémi Piotaix
New patch :-) https://codereview.chromium.org/364193004/diff/180001/src/core/SkTHashCache.h File src/core/SkTHashCache.h (right): https://codereview.chromium.org/364193004/diff/180001/src/core/SkTHashCache.h#newcode30 src/core/SkTHashCache.h:30: bool has(const Key& key) const { ...
6 years, 5 months ago (2014-07-14 20:38:59 UTC) #25
mtklein
lgtm
6 years, 5 months ago (2014-07-14 21:01:40 UTC) #26
Rémi Piotaix
The CQ bit was checked by piotaixr@chromium.org
6 years, 5 months ago (2014-07-14 21:05:43 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/piotaixr@chromium.org/364193004/200001
6 years, 5 months ago (2014-07-14 21:06:07 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Win7-VS2010-x86-Debug-Trybot on tryserver.skia ...
6 years, 5 months ago (2014-07-14 21:21:49 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-14 21:24:11 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win7-VS2010-x86-Debug-Trybot on tryserver.skia (http://108.170.220.76:10117/builders/Build-Win7-VS2010-x86-Debug-Trybot/builds/823)
6 years, 5 months ago (2014-07-14 21:24:16 UTC) #31
Rémi Piotaix
On 2014/07/14 21:24:16, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 5 months ago (2014-07-14 21:42:18 UTC) #32
mtklein
On 2014/07/14 21:42:18, Rémi Piotaix wrote: > On 2014/07/14 21:24:16, I haz the power (commit-bot) ...
6 years, 5 months ago (2014-07-14 22:37:28 UTC) #33
Rémi Piotaix
The CQ bit was checked by piotaixr@chromium.org
6 years, 5 months ago (2014-07-15 16:06:08 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/piotaixr@chromium.org/364193004/210001
6 years, 5 months ago (2014-07-15 16:06:43 UTC) #35
commit-bot: I haz the power
Change committed as 8339371f1ec3c57a0741932fd96bff32c53d4e54
6 years, 5 months ago (2014-07-16 02:41:15 UTC) #36
bungeman-skia
A revert of this CL has been created in https://codereview.chromium.org/395203002/ by bungeman@google.com. The reason for ...
6 years, 5 months ago (2014-07-16 16:09:58 UTC) #37
Rémi Piotaix
In patchset 16 (and probably in 17 too) the tests are failing on the android ...
6 years, 3 months ago (2014-09-15 15:26:33 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/364193004/330001
6 years, 2 months ago (2014-10-01 18:20:23 UTC) #40
Justin Novosad
On 2014/10/01 18:20:23, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 2 months ago (2014-10-02 17:56:31 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/364193004/330001
6 years, 2 months ago (2014-10-02 17:57:38 UTC) #44
commit-bot: I haz the power
6 years, 2 months ago (2014-10-02 17:58:03 UTC) #45
Message was sent while issue was closed.
Committed patchset #18 (id:330001) as e4b231428e8c14cbc82d20cfb12eb08fc45f8df6

Powered by Google App Engine
This is Rietveld 408576698