1. 04 Apr, 2018 36 commits
  2. 03 Apr, 2018 4 commits
    • David Benjamin's avatar
      Rework MerkleIntegritySourceStream. · 98abd377
      David Benjamin authored
      This cuts down on the number of copies and fixes some other bits:
      
      - Add a fuzzer.
      
      - Document a place where the original implementation did not match the
        specification. (The final record's size is a little iffy. We probably
        want a small spec tweak.)
      
      - Use a streaming SHA-256 implementation, rather than making a copy to
        stick the 0 or 1 in the hash.
      
      - If there is no more room in the output (the consumer may be issuing
        smaller reads), stop processing input. There is no need to make a copy
        of the entire input. MerkleIntegeritySourceStream only needs to buffer
        at most one record. (Ideally we wouldn't even do and instead
        coordinate with the base class's read buffer, but that would require
        tweaking the FilteredSourceStream interface. This CL addresses the
        easy stuff.)
      
      - Fix O(N^2) behavior if the caller issues tiny reads in the buffered
        output.
      
      - If the record is entirely in the input buffer (common case), don't
        make a copy to extract it.
      
      - If the output fits entirely in the output buffer (common case), don't
        make a copy to return it.
      
      - Flesh out missing tests, based on code coverage tools and important
        security checks (notably truncation).
      
        (For others trying to repeat the coverage bits: this file was
        unfortunately placed in //content rather than //net, so I wasn't able
        to get the coverage tools to work without hacking it into
        net_unittests locally. It seems the X server dependency is
        problematic for tools/code_coverage?? Also content_unittests is huge.)
      
      - s/MI-256/MI-SHA256/. There are other 256-bit hashes.
      
      Bug: 814591
      Change-Id: If927d3f49085a5bec31939846c9a55f8903da34a
      Reviewed-on: https://chromium-review.googlesource.com/981798Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
      Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
      Reviewed-by: default avatarMax Moroz <mmoroz@chromium.org>
      Commit-Queue: David Benjamin <davidben@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#547874}
      98abd377
    • Bo Liu's avatar
      android: Stop using deprecated Canvas.clipPath · b84d9222
      Bo Liu authored
      On versions where the API is deprecated. The desired behavior of
      essentially inverting the mask can be done with clipOutPath on O or
      above, and by Op.DIFFERENCE for below.
      
      Bug: 828195
      Change-Id: I08f262018f1596fd79556667961ed80a97221768
      Reviewed-on: https://chromium-review.googlesource.com/994257Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
      Commit-Queue: Bo <boliu@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#547873}
      b84d9222
    • Christopher Cameron's avatar
      cc: Add missed GpuMemoryBuffer:SetColorSpace call · 3cf3eea9
      Christopher Cameron authored
      This call is necessary to set the color space property on the backing
      IOSurface.
      
      It may be that we should change this API to require specifying a color
      space a GpuMemoryBuffer creation time. That would be an artifical
      constraint, but would make bugs of this sort less likely.
      
      This needs a merge to M66, so I'm not considering it in this patch.
      
      Bug: 827670
      Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: If5ecdc5a8efcefcf1fcbc9c8a230cd716005ac2e
      Reviewed-on: https://chromium-review.googlesource.com/988826Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
      Commit-Queue: ccameron <ccameron@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#547872}
      3cf3eea9
    • James Cook's avatar
      cros: Clean up Widget::InitParams::context usage in //ash · 8cce6adb
      James Cook authored
      views::Widget::InitParams::context is not required on Chrome OS. Remove
      places that set it unnecessarily in //ash.
      
      Make ash_unittests provide a default context in ViewsDelegate, just
      like Chrome does in ChromeViewsDelegate.
      
      Clean up some CreateTestWindow / CreateTestWidget functions.
      
      Clean up a couple cases where windows were being reparented
      unnecessarily in tests.
      
      Bug: 826569
      Test: ash_unittests
      Change-Id: I5d3cfa4501a826357615e5a42564ac2b5e9a2a19
      Reviewed-on: https://chromium-review.googlesource.com/988939
      Commit-Queue: James Cook <jamescook@chromium.org>
      Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#547871}
      8cce6adb