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

Issue 860333002: Make GrScratchKey memory buffer correct size on copy (Closed)

Created:
5 years, 11 months ago by Kimmo Kinnunen
Modified:
5 years, 11 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Make GrScratchKey memory buffer correct size on copy Scratch key memory buffer of a copy of a key was too big. The (new) copy was N times uint32_t bytes instead of N bytes. Adds few tests to resource cache. These tests would not catch the too big buffer. This is just a precaution for too small buffers. The main idea of the test change is that the scratch key should contain some information, so that lookup with a scratch key can also return no match. Otherwise testing of scratch lookup result is not indicative of correct code (eg. no-information scratch key will always match). Committed: https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -38 lines) Patch
M include/gpu/GrResourceKey.h View 1 chunk +3 lines, -3 lines 0 comments Download
M tests/ResourceCacheTest.cpp View 12 chunks +136 lines, -35 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
Kimmo Kinnunen
5 years, 11 months ago (2015-01-21 10:27:00 UTC) #2
Kimmo Kinnunen
Personal preference would be to make Builder generic to the size, since the size defines ...
5 years, 11 months ago (2015-01-21 10:46:02 UTC) #3
bsalomon
lgtm, nice catch and thanks for the additional tests. What do you mean by making ...
5 years, 11 months ago (2015-01-21 14:10:12 UTC) #4
Kimmo Kinnunen
On 2015/01/21 14:10:12, bsalomon wrote: > lgtm, nice catch and thanks for the additional tests. ...
5 years, 11 months ago (2015-01-21 14:15:17 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/860333002/1
5 years, 11 months ago (2015-01-21 14:16:19 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2
5 years, 11 months ago (2015-01-21 14:39:18 UTC) #8
mtklein
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/864833003/ by mtklein@google.com. ...
5 years, 11 months ago (2015-01-21 16:04:51 UTC) #9
mtklein
On 2015/01/21 16:04:51, mtklein wrote: > A revert of this CL (patchset #1 id:1) has ...
5 years, 11 months ago (2015-01-21 16:23:08 UTC) #10
bsalomon
5 years, 11 months ago (2015-01-21 16:25:04 UTC) #11
Message was sent while issue was closed.
On 2015/01/21 16:04:51, mtklein wrote:
> A revert of this CL (patchset #1 id:1) has been created in
> https://codereview.chromium.org/864833003/ by mailto:mtklein@google.com.
> 
> The reason for reverting is: Our Valgrind bot just spewed out a weird error. 
I
> don't know if it's related, but it looks at least like one of the stacks was
in
> the right area, so I'm going to revert this precautionarily.  Sorry if this is
a
> false positive.
> 
>
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX55....

Attempting to reland here: https://codereview.chromium.org/863983003

Powered by Google App Engine
This is Rietveld 408576698