Commit Graph

8 Commits

Author SHA1 Message Date
John Stiles
7571f9e490 Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'.
Mechanically updated via Xcode "Replace Regular Expression":

  typedef (.*) INHERITED;
    -->
  using INHERITED = $1;

The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.

Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-03 03:41:26 +00:00
John Stiles
fbd050bd0b Enable ClangTidy check modernize-make-unique.
The majority of existing call sites were automatically updated using
clang-tidy -fix. A small handful required a manual update,
e.g. CppCodeGen.

This check is a bit lenient, and in particular will not flag cases like
`std::unique_ptr<Base>(new Derived())` which is still pretty common
throughout our codebase. This CL does not attempt to replace all the
cases that ClangTidy does not flag.

Change-Id: I5eba48ef880e25d22de80f321a68c389ba769e36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307459
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-03 17:53:52 +00:00
Leon Scroggins III
43182bccce Remove SkBitmapRegionDecoder and SkBRDAllocator
Bug: skia:10154

Once ag/11371053 lands, Android will only be referencing the new version
at android::skia::BitmapRegionDecoder. Remove the old code that remained
for the transition.

Change-Id: Ic532d705e8f2861f56dcaa0ac1c68dd2b0712035
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291357
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-06-01 20:56:29 +00:00
Leon Scroggins III
87caae61cd Move SkBitmapRegionCodec into client_utils/android
Bug: skia:10154

This will make it clear that these files are for Android use and
avoid compiling them for other clients.

Update testing tools to use android::skia::BitmapRegionDecoder, but
only if SK_ENABLE_ANDROID_UTILS is defined.

Take this opportunity to clean up the class:
- The base class, which was originally designed to allow switching
  amongst different implementations, is no longer needed. Rename
  SkBitmapRegionCodec to android::skia::BitmapRegionDecoder
  (following the new convention and matching the Java API name).
  Continue to inherit from SkBitmapRegionDecoder temporarily, to
  allow Android to switch to the new API.
- Use std::unique_ptr instead of passing raw pointers.

Add a test to verify that we only create a BitmapRegionDecoder if
it is one of the supported types.

Change-Id: Ied13fc8acb105fde042553331846d95ae15d6b57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287498
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-05-20 20:06:48 +00:00
Leon Scroggins III
7676f4ecf3 Remove SkFrontBufferedStream
Bug: skia:10154

Now that Android has moved to the new name
(android::skia::FrontBufferedStream), there is no need for this
redirect.

Change-Id: I1f2203a1d50bb222b8c105d8393a3b11ad6ee462
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285716
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-04-28 13:51:40 +00:00
Leon Scroggins III
63cfb3638c Reland "Move SkFrontBufferedStream into Android-only dir"
This reverts commit b25f30348b.

Bug: skia:10154

Original message:
> Add client_utils for code that is specifically for a single client.
> Move SkFrontBufferedStream into its android/ subdir. Rename the class
> to android::skia::FrontBufferedStream. Temporarily leave in
> SkFrontBufferedStream until Android updates to the new API.
>
> Add a new optional target for client_utils/android. It is built in dev
> builds for testing, and when building for the Android framework.

Deliberately do not include client_utils in Google3, since the whole
point is to only include where necessary.

Change-Id: I48938c56aabb98e1ed820240d43ffcd0fdce7956
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285104
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-04-24 17:36:30 +00:00
Joe Gregorio
b25f30348b Revert "Move SkFrontBufferedStream into Android-only dir"
This reverts commit 513720f28e.

Reason for revert: Breaking the google3 roll:
   https://sponge.corp.google.com/invocation?tab=Build+Log&id=5f96970b-8171-4c2f-abf3-006e11b8fff9

Original change's description:
> Move SkFrontBufferedStream into Android-only dir
> 
> Bug: skia:10154
> 
> Add client_utils for code that is specifically for a single client.
> Move SkFrontBufferedStream into its android/ subdir. Rename the class
> to android::skia::FrontBufferedStream. Temporarily leave in
> SkFrontBufferedStream until Android updates to the new API.
> 
> Add a new optional target for client_utils/android. It is built in dev
> builds for testing, and when building for the Android framework.
> 
> Change-Id: Ie0f425051ea370aab7861d61150a3d6007214a93
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284721
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>

TBR=djsollen@google.com,scroggo@google.com,reed@google.com

Change-Id: Iaeedaed184cc35f507d5441631ae709e1c5cb1ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10154
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285100
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2020-04-23 18:23:30 +00:00
Leon Scroggins III
513720f28e Move SkFrontBufferedStream into Android-only dir
Bug: skia:10154

Add client_utils for code that is specifically for a single client.
Move SkFrontBufferedStream into its android/ subdir. Rename the class
to android::skia::FrontBufferedStream. Temporarily leave in
SkFrontBufferedStream until Android updates to the new API.

Add a new optional target for client_utils/android. It is built in dev
builds for testing, and when building for the Android framework.

Change-Id: Ie0f425051ea370aab7861d61150a3d6007214a93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284721
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-04-23 17:02:18 +00:00