| Index: components/test_runner/pixel_dump.cc
|
| diff --git a/components/test_runner/pixel_dump.cc b/components/test_runner/pixel_dump.cc
|
| index 67881c94b30008ab4e48d40cc36e9bd873e868de..517811d281a06886abf2cb9e51952483ed6a479e 100644
|
| --- a/components/test_runner/pixel_dump.cc
|
| +++ b/components/test_runner/pixel_dump.cc
|
| @@ -65,7 +65,7 @@ class CaptureCallback : public blink::WebCompositeAndReadbackAsyncCallback {
|
| };
|
|
|
| void DrawSelectionRect(const PixelsDumpRequest& dump_request,
|
| - SkCanvas* canvas) {
|
| + CdlCanvas* canvas) {
|
| // See if we need to draw the selection bounds rect. Selection bounds
|
| // rect is the rect enclosing the (possibly transformed) selection.
|
| // The rect should be drawn after everything is laid out and painted.
|
| @@ -76,10 +76,10 @@ void DrawSelectionRect(const PixelsDumpRequest& dump_request,
|
| if (wr.isEmpty())
|
| return;
|
| // Render a red rectangle bounding selection rect
|
| - SkPaint paint;
|
| + CdlPaint paint;
|
| paint.setColor(0xFFFF0000); // Fully opaque red
|
| - paint.setStyle(SkPaint::kStroke_Style);
|
| - paint.setFlags(SkPaint::kAntiAlias_Flag);
|
| + paint.setStyle(CdlPaint::kStroke_Style);
|
| + paint.setAntiAlias(true);
|
| paint.setStrokeWidth(1.0f);
|
| SkIRect rect; // Bounding rect
|
| rect.set(wr.x, wr.y, wr.x + wr.width, wr.y + wr.height);
|
| @@ -96,7 +96,7 @@ void CapturePixelsForPrinting(std::unique_ptr<PixelsDumpRequest> dump_request) {
|
| int totalHeight = page_count * (page_size_in_pixels.height + 1) - 1;
|
|
|
| bool is_opaque = false;
|
| - std::unique_ptr<SkCanvas> canvas = skia::TryCreateBitmapCanvas(
|
| + std::unique_ptr<CdlCanvas> canvas = skia::TryCreateBitmapCanvas(
|
| page_size_in_pixels.width, totalHeight, is_opaque);
|
| if (!canvas) {
|
| LOG(ERROR) << "Failed to create canvas width="
|
| @@ -138,7 +138,7 @@ void CaptureCallback::didCompositeAndReadback(const SkBitmap& bitmap) {
|
|
|
| void DidCapturePixelsAsync(std::unique_ptr<PixelsDumpRequest> dump_request,
|
| const SkBitmap& bitmap) {
|
| - SkCanvas canvas(bitmap);
|
| + CdlCanvas canvas(bitmap);
|
| DrawSelectionRect(*dump_request, &canvas);
|
| if (!dump_request->callback.is_null())
|
| dump_request->callback.Run(bitmap);
|
|
|