Commit Graph

139 Commits

Author SHA1 Message Date
Brian Osman
1e420a3652 Revert "Fix dithering on drawImage[Rect] calls"
This reverts commit 10241484aa.

Reason for revert: Speculative revert for b/220676062

Original change's description:
> Fix dithering on drawImage[Rect] calls
>
> Bug: skia:12516
> Change-Id: Ibb68558e0f474143df3c6a5fb0fb3d4881529226
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508677
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Bug: skia:12516
Change-Id: If496c6be355bbb026ffe478512f8a6334116bb66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511806
Commit-Queue: Brian Osman <brianosman@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-22 23:17:20 +00:00
Michael Ludwig
10241484aa Fix dithering on drawImage[Rect] calls
Bug: skia:12516
Change-Id: Ibb68558e0f474143df3c6a5fb0fb3d4881529226
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508677
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-15 18:59:02 +00:00
Robert Phillips
4dca83162b Rename GrSurfaceDrawContext to skgpu::v1::SurfaceDrawContext
This CL is mostly mechanical. It:

replaces "src/gpu/GrSurfaceDrawContext.h" #includes with
         "src/gpu/v1/SurfaceDrawContext_v1.h" and reorders

replaces "class GrSurfaceDrawContext;" with
         "namespace skgpu { namespace v1 { class SurfaceDrawContext; }}"

replaces "GrSurfaceDrawContext*" with "auto" where possible
replaces "rtc" with "sdc"
replaces "surfaceDrawContext" with "sdc"
replaces GrSurfaceDrawContext with skgpu::v1::SurfaceDrawContext
reflows parameters as needed

This CL does not try to:

make skgpu::v1::SurfaceDrawContext V1-only
minimize the skgpu and/or skgpu::v1 prefixes

Those two tasks will be accomplished in follow up CLs. This CL is just trying to get the bulk of the mechanical changes comprehensibly landed.

Bug: skia:11837
Change-Id: I6fe59080249d585df8f5d27c6b67569cdc35842f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-07-28 20:12:10 +00:00
Robert Phillips
7a0d3c3f12 Revise GM infrastructure to not rely on GrSurfaceDrawContext
The SDC will soon be V1-only. Remove it from the generic testing infrastructure and require each V1-specific GM to explicitly retrieve it.

Bug: skia:11837
Change-Id: I4c904b7e333333382062bde4b17a1f9f81bee6a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430425
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-07-21 20:59:37 +00:00
Mike Reed
2bdf6ed96f Stop using SkFilterQuality
Change-Id: Ief80d125eacb5922b95ab16ebc8d6b483469ada7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429097
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-17 01:55:42 +00:00
Mike Reed
607a382298 drawBitmap is deprecated, use drawImage
Change-Id: Ib66517fe26036704ccb8328ef92fa0f5240c79f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358222
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-25 01:44:55 +00:00
Mike Reed
d396cd50ff Pass sampling to drawimage
Change-Id: Ia1cd20bb4ea1afeb31a1e47da054c309bdaf15bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358216
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-24 03:07:23 +00:00
Mike Reed
b746b1f598 Pass sampling to surface.draw
Bug: skia:7650
Change-Id: I97941a44faa4176f94d57a9c1626ac36b0c0c4ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350557
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-06 19:05:00 +00:00
Mike Reed
ac9f0c9e27 Bitmap.asImage()
... and lots and lots of IWYU

Change-Id: Ie5157dcdd2e6d29b95c71b39153278ab48ef4eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346778
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-23 15:54:57 +00:00
Brian Salomon
eebe735dea GrRenderTargetContext->GrSurfaceDrawContext
Just the class/files. variable names and additional comments to follow.

Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-10 18:51:19 +00:00
Mike Reed
ce0c876ce2 hide legacy scalePixels and makeShader
Change-Id: Idae1e44aa0417adb943fd20112fb4f1fa81167f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337719
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-11-24 00:41:33 +00:00
Robert Phillips
27f283f250 Update error handling in DDL-averse GMs
This will allow local debug DDL dm runs to complete.

Change-Id: I47aa978c5e52fd1dcdba45c59318844bae871115
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326796
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-14 16:42:01 +00:00
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
bd3ffa43d2 Fix range-based for loops which copy the loop variable unnecessarily.
This will allow us to enable the ClangTidy check
performance-for-range-copy.

Change-Id: I11f152ffe458f5f353da8715ffd2fd47cf4e71a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306946
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-31 01:02:21 +00:00
Robert Phillips
16bf7d31c8 Make SkGpuDevice hold a GrRecordingContext (take 2)
This makes the code reflect what is actually going on. During DDL
recording the SkGpuDevice only holds a recording context.

This can't land until the following Chrome-side CL lands:

https://chromium-review.googlesource.com/c/chromium/src/+/2277964 (Add GrContext.h include to skia renderer for upcoming Skia roll)

Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299867
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Change-Id: I6ef3896f5a270a4fa7af37f9121f68a66653cce2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300896
2020-07-09 12:28:22 +00:00
Chris Dalton
05da783f87 Revert "Make SkGpuDevice hold a GrRecordingContext"
This reverts commit c8b721b086.

Reason for revert: Looks like it's causing build failures around
MakeRenderTargetContext on the roll.

Original change's description:
> Make SkGpuDevice hold a GrRecordingContext
> 
> This makes the code reflect what is actually going on. During DDL
> recording the SkGpuDevice only holds a recording context.
> 
> This can't land until the following Chrome-side CL lands:
> 
> https://chromium-review.googlesource.com/c/chromium/src/+/2277964 (Add GrContext.h include to skia renderer for upcoming Skia roll)
> 
> Change-Id: I69cfa744226c315c25f68fc509b7b59ec38bbf31
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299867
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com

Change-Id: I6a362daf7c40e36ed9f068c5b2d477c16a3f778e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300853
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-07-07 07:23:55 +00:00
Robert Phillips
c8b721b086 Make SkGpuDevice hold a GrRecordingContext
This makes the code reflect what is actually going on. During DDL
recording the SkGpuDevice only holds a recording context.

This can't land until the following Chrome-side CL lands:

https://chromium-review.googlesource.com/c/chromium/src/+/2277964 (Add GrContext.h include to skia renderer for upcoming Skia roll)

Change-Id: I69cfa744226c315c25f68fc509b7b59ec38bbf31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299867
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-07-07 01:35:30 +00:00
Robert Phillips
b7bfbc299a Move GrRecordingContext.h and GrDirectContext.h into include/gpu
External clients will need access to these classes once GrContext
goes away.

This is a purely mechanical CL.

Bug: skia:10441
Change-Id: I7ffeb29d88bcc0f012412fba911e8362d046e24a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300206
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-01 17:32:14 +00:00
Robert Phillips
f8f45d91b2 Make asDirectContext public
External clients will eventually have to call this to get access
to a direct context from an SkCanvas or SkSurface (which will
only have 'recordingContext' accessors).

Bug: skia:10441
Change-Id: I10e34081277b685fa59d03e1fce1887f3524e0fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300178
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-01 16:30:03 +00:00
Robert Phillips
44333c58f6 Make asDirectContext return a GrDirectContext
Change-Id: I373658d68582adc9728f3a75d84178a365f5b798
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299877
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-06-30 18:48:17 +00:00
Robert Phillips
95c250c247 Downgrade GpuGMs to only receiving a GrRecordingContext
Most of this CL is just noise (i.e., all the header changes) due to the
signature change. The 'discard' GM has some substantive changes but
that's about it.

Change-Id: I72011a442c149b5db93cf8decade6779be4f63d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296704
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-30 13:02:33 +00:00
Mike Reed
92b33354dd more rect api simplifications
set --> setLTRB
set(pts, count) --> setBounds

Bug: skia:9328
Change-Id: I807c0598a8b23b2f721db118ec41c1607114205a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237038
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-08-25 10:12:57 +00:00
Brian Osman
d566e2eab7 Remove unused dstColorSpace parameter from makeTextureImage
Old version still exists until client code is migrated.

Change-Id: I087b6b977f586d334f9a20954e7ed7b5e4b7ea5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234579
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-14 19:09:05 +00:00
Ben Wagner
7fde8e1728 IWYU for gms.
This almost gets gms to be iwyu clean. The last bit is around gm.cpp
and the tracing framework and its use of atomic. Will also need a way
of keeping things from regressing, which is difficult due to needing to
do this outside-in.

Change-Id: I1393531e99da8b0f1a29f55c53c86d53f459af7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211593
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-02 17:48:53 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
ea3f014e2b sk_tool_utils -> ToolUtils, and git clang-format
sk_tool_utils doesn't really fit the naming convention
the rest of code under tools/ tends to use.

Change-Id: I45326a174101c6eb4b6149e9c742f658f2fd23b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202313
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 18:05:42 +00:00
Chris Dalton
50e24d7d5f Add a mechanism for GMs to silently exclude themselves from Gold
This is useful, for example, when trying to test a hardware feature
that isn't supported in the current context.

Bug: skia:8731
Change-Id: I9a363159300c92e4039bfd05400238c27002efb1
Reviewed-on: https://skia-review.googlesource.com/c/189133
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-02-08 00:05:15 +00:00
Chris Dalton
3a77837a5d Reland "Add a GpuGM class for GPU-only tests"
This is a reland of f5efa78902

Original change's description:
> Add a GpuGM class for GPU-only tests
>
> Bug: skia:8731
> Change-Id: Ic81f21621c0183bb356601eb663fa1ee334bca55
> Reviewed-on: https://skia-review.googlesource.com/c/189134
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=mtklein@google.com

Bug: skia:8731
Change-Id: Ia322d7e9280b67ebea1edbefc820cae72cd9c3a6
Reviewed-on: https://skia-review.googlesource.com/c/190148
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-02-07 23:11:16 +00:00
Chris Dalton
382b122e45 Revert "Add a GpuGM class for GPU-only tests"
This reverts commit f5efa78902.

Reason for revert: PreAbandon failures

Original change's description:
> Add a GpuGM class for GPU-only tests
> 
> Bug: skia:8731
> Change-Id: Ic81f21621c0183bb356601eb663fa1ee334bca55
> Reviewed-on: https://skia-review.googlesource.com/c/189134
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=mtklein@google.com,brianosman@google.com,csmartdalton@google.com

Change-Id: Iab2a4323f077277445add18bb0e8c658d3bf0d2a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8731
Reviewed-on: https://skia-review.googlesource.com/c/190121
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-02-07 10:06:01 +00:00
Chris Dalton
f5efa78902 Add a GpuGM class for GPU-only tests
Bug: skia:8731
Change-Id: Ic81f21621c0183bb356601eb663fa1ee334bca55
Reviewed-on: https://skia-review.googlesource.com/c/189134
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-02-06 21:04:59 +00:00
Chris Dalton
d7a5a1d27e Add a central skiagm::GM::DrawFailureMessage for error messages
Bug: skia:8731
Change-Id: If73216bd427a1ce773fa41044a45c1bbd7ea08e9
Reviewed-on: https://skia-review.googlesource.com/c/189124
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-02-04 17:49:42 +00:00
Hal Canary
6ac0df8e7d drawText Cleanup
Change-Id: Ibe1ac895f0347faf44820aa70350e7020807cb85
Reviewed-on: https://skia-review.googlesource.com/c/182080
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-01-08 15:26:36 +00:00
Leon Scroggins III
0098ccbab5 Remove unnecessary sk_tool_utils::EncodeImageToData
This template is only used in practice for SkBitmaps. There is already a
public API that does the same thing, so there's no need for this one.

Change-Id: I20b10aa8bc87a56face947689e1f0eaf4c3cc4e8
Reviewed-on: https://skia-review.googlesource.com/156540
Reviewed-by: Hal Canary <halcanary@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-09-25 12:02:26 +00:00
Hal Canary
8a00144035 test,tools: whitespace changes for clang-format
Change-Id: I67529f6c0ac26da603f60af22c620f8f603d8a19
Reviewed-on: https://skia-review.googlesource.com/155564
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-09-19 17:50:51 +00:00
Cary Clark
a24712e4dc Revert "makeSurface defaults to raster"
This reverts commit 29a4a684af.

Reason for revert: some configs fail

Original change's description:
> makeSurface defaults to raster
> 
> Rather that returning nullptr for a recording
> canvas, return a raster canvas instead.
> 
> R=​reed@google.com,robertphillips@google.com
> 
> Bug: skia:
> Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
> Reviewed-on: https://skia-review.googlesource.com/151666
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,reed@google.com,caryclark@skia.org

Change-Id: I82d2c3e4589a2ca8523bbf86884ed68b1431631d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/151824
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-09-05 18:41:45 +00:00
Cary Clark
29a4a684af makeSurface defaults to raster
Rather that returning nullptr for a recording
canvas, return a raster canvas instead.

R=reed@google.com,robertphillips@google.com

Bug: skia:
Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
Reviewed-on: https://skia-review.googlesource.com/151666
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-05 17:36:49 +00:00
Robert Phillips
a07bf6788e Add bullet proofing to image_subset GM for TSAN failures
The most common TSAN failure is:

	glmsaa8 gm  image_subset

with this stack trace:

5.73m	    /b/s/w/ir/build/dm(_ZNK7SkImage10makeSubsetERK7SkIRect+0x96) [0x1a7c356]
    /b/s/w/ir/build/dm(_ZNK7SkImage10makeSubsetERK7SkIRect+0x96) [0x1a7c356]
5.73m	    /b/s/w/ir/build/dm() [0x12cf587]
    /b/s/w/ir/build/dm() [0x12cf587]
5.73m	    /b/s/w/ir/build/dm(_ZN6skiagm8SimpleGM6onDrawEP8SkCanvas+0x25) [0x12ba205]

Change-Id: Ife1c27af935ef3f56073360e9781a89fe8206586
Reviewed-on: https://skia-review.googlesource.com/141280
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-07-13 14:59:44 +00:00
Brian Osman
c7ad40f76f Remove SK_SUPPORT_GPU checks in tool-only code
Most of this is (obviously) not necessary to do, but once
I started, I figured I'd just get it all. Tools (nanobench,
DM, skiaserve), all GMs, benches, and unit tests, plus support
code (command line parsing and config stuff).

This is almost entirely mechanical.

Bug: skia:
Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb
Reviewed-on: https://skia-review.googlesource.com/131153
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-31 18:59:44 +00:00
Mike Reed
f2c736400f support image-subsets in serialization
A follow-on API change *could* be to extend the SerialProcs to pass subset information
up to the client, in case they want to handle the subsetting step themselves.

Bug: skia:7983
Change-Id: I36d3f1ce439886384495485c3be3c591d611a135
Reviewed-on: https://skia-review.googlesource.com/130543
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-05-29 20:42:17 +00:00
Mike Reed
5dd202dc90 Revert "Revert "move GrColor.h to private, IWYU""
This reverts commit 63cc29304a.

Reason for revert: pdfium updated

Original change's description:
> Revert "move GrColor.h to private, IWYU"
> 
> This reverts commit e602f39581.
> 
> Reason for revert: Breaks PDFIUM
> 
> Original change's description:
> > move GrColor.h to private, IWYU
> > 
> > Bug: skia:
> > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
> > Reviewed-on: https://skia-review.googlesource.com/104160
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,reed@google.com
> 
> Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/104440
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reed@google.com

Change-Id: I22fa5c0e0628b5c1f3b5f13879c7d1a4528cc93a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/104561
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-06 23:05:46 +00:00
Brian Salomon
63cc29304a Revert "move GrColor.h to private, IWYU"
This reverts commit e602f39581.

Reason for revert: Breaks PDFIUM

Original change's description:
> move GrColor.h to private, IWYU
> 
> Bug: skia:
> Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
> Reviewed-on: https://skia-review.googlesource.com/104160
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reed@google.com

Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/104440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-06 18:33:26 +00:00
Mike Reed
e602f39581 move GrColor.h to private, IWYU
Bug: skia:
Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
Reviewed-on: https://skia-review.googlesource.com/104160
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-06 15:42:15 +00:00
Hal Canary
15bd9249de gm: image-surface: stop looking for nonexistant file
Change-Id: Iaac032f96b47901effb303cd99be15145c66fae1
Reviewed-on: https://skia-review.googlesource.com/84500
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-13 15:56:42 +00:00
Mike Reed
ba61af9bc1 test scalePixels and unpremul
Bug: skia:5733
Change-Id: I6c661408198f6a536e1e55ba01d976948446b8eb
Reviewed-on: https://skia-review.googlesource.com/70280
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-16 17:34:54 +00:00
Mike Reed
6409f84fc3 Revert "Revert "Change image encode api to return sk_sp""
This reverts commit 64778d9f27.

Bug: skia:
Change-Id: I779515ff1e16a40c33890a4bac7a8a07171aadfe
Reviewed-on: https://skia-review.googlesource.com/22261
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-12 15:44:35 +00:00
Mike Reed
64778d9f27 Revert "Change image encode api to return sk_sp"
This reverts commit dc799550e2.

Reason for revert: need to fix sites in Document_none

Original change's description:
> Change image encode api to return sk_sp
> 
> Bug: skia:
> Change-Id: I238289bc630be27795cb1384955dd6e887597c05
> Reviewed-on: https://skia-review.googlesource.com/22208
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=scroggo@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Id7f67027e5f1405a60fdbde29863cdf8daef0cb7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22280
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-11 16:00:32 +00:00
Mike Reed
dc799550e2 Change image encode api to return sk_sp
Bug: skia:
Change-Id: I238289bc630be27795cb1384955dd6e887597c05
Reviewed-on: https://skia-review.googlesource.com/22208
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-07-11 15:43:21 +00:00
Cary Clark
2a475eae62 add drawString helper to canvas
Many tests and examples use drawText with
a guess of how long the text is in bytes,
or a call to strlen(). Add a helper to
SkCanvas to simplify these examples.

Add another helper for SkString.

R=reed@google.com

Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2
Reviewed-on: https://skia-review.googlesource.com/13642
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-04-28 20:41:04 +00:00
Mike Klein
33d2055e59 GM: some header cleanup
gm.h includes sk_tool_utils.h but does not use it.

The bulk of this CL makes each gm that uses sk_tool_utils include it.

sk_tool_utils.h also provided SkRandom and SkTDArray,
so a couple GMs add those headers too.

Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1
Reviewed-on: https://skia-review.googlesource.com/10014
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-03-22 18:11:49 +00:00
Brian Salomon
d3b65972aa Mark overridden destructors with 'override' and remove 'virtual'
This silences a new warning in clang 5.0

Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8
Reviewed-on: https://skia-review.googlesource.com/10006
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-22 16:06:18 +00:00