| Index: ui/gfx/canvas.h
|
| diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
|
| index 66a55980af9a9f3a59c573f8d089f6c6e8673b16..c4c7bb593348cc1ac0b13fba35eea28720ceef83 100644
|
| --- a/ui/gfx/canvas.h
|
| +++ b/ui/gfx/canvas.h
|
| @@ -91,7 +91,8 @@ class GFX_EXPORT Canvas {
|
| // so no additional scaling is applied.
|
| // Note: the caller must ensure that sk_canvas outlives this object, or until
|
| // RecreateBackingCanvas is called.
|
| - Canvas(SkCanvas* sk_canvas, float image_scale);
|
| + // TODO(cdl): Update CdlCanvas to non ref-counted.
|
| + Canvas(CdlCanvas* sk_canvas, float image_scale);
|
|
|
| virtual ~Canvas();
|
|
|
| @@ -260,18 +261,18 @@ class GFX_EXPORT Canvas {
|
| // Draws the given rectangle with the given |paint| parameters.
|
| // DEPRECATED in favor of the RectF version below.
|
| // TODO(funkysidd): Remove this (http://crbug.com/553726)
|
| - void DrawRect(const Rect& rect, const SkPaint& paint);
|
| + void DrawRect(const Rect& rect, const CdlPaint& paint);
|
|
|
| // Draws the given rectangle with the given |paint| parameters.
|
| - void DrawRect(const RectF& rect, const SkPaint& paint);
|
| + void DrawRect(const RectF& rect, const CdlPaint& paint);
|
|
|
| // Draw the given point with the given |paint| parameters.
|
| // DEPRECATED in favor of the RectF version below.
|
| // TODO(funkysidd): Remove this (http://crbug.com/553726)
|
| - void DrawPoint(const Point& p, const SkPaint& paint);
|
| + void DrawPoint(const Point& p, const CdlPaint& paint);
|
|
|
| // Draw the given point with the given |paint| parameters.
|
| - void DrawPoint(const PointF& p, const SkPaint& paint);
|
| + void DrawPoint(const PointF& p, const CdlPaint& paint);
|
|
|
| // Draws a single pixel line with the specified color.
|
| // DEPRECATED in favor of the RectF version below.
|
| @@ -284,34 +285,32 @@ class GFX_EXPORT Canvas {
|
| // Draws a line with the given |paint| parameters.
|
| // DEPRECATED in favor of the RectF version below.
|
| // TODO(funkysidd): Remove this (http://crbug.com/553726)
|
| - void DrawLine(const Point& p1, const Point& p2, const SkPaint& paint);
|
| + void DrawLine(const Point& p1, const Point& p2, const CdlPaint& paint);
|
|
|
| // Draws a line with the given |paint| parameters.
|
| - void DrawLine(const PointF& p1, const PointF& p2, const SkPaint& paint);
|
| + void DrawLine(const PointF& p1, const PointF& p2, const CdlPaint& paint);
|
|
|
| // Draws a circle with the given |paint| parameters.
|
| // DEPRECATED in favor of the RectF version below.
|
| // TODO(funkysidd): Remove this (http://crbug.com/553726)
|
| - void DrawCircle(const Point& center_point,
|
| - int radius,
|
| - const SkPaint& paint);
|
| + void DrawCircle(const Point& center_point, int radius, const CdlPaint& paint);
|
|
|
| // Draws a circle with the given |paint| parameters.
|
| void DrawCircle(const PointF& center_point,
|
| float radius,
|
| - const SkPaint& paint);
|
| + const CdlPaint& paint);
|
|
|
| // Draws the given rectangle with rounded corners of |radius| using the
|
| // given |paint| parameters. DEPRECATED in favor of the RectF version below.
|
| // TODO(mgiuca): Remove this (http://crbug.com/553726).
|
| - void DrawRoundRect(const Rect& rect, int radius, const SkPaint& paint);
|
| + void DrawRoundRect(const Rect& rect, int radius, const CdlPaint& paint);
|
|
|
| // Draws the given rectangle with rounded corners of |radius| using the
|
| // given |paint| parameters.
|
| - void DrawRoundRect(const RectF& rect, float radius, const SkPaint& paint);
|
| + void DrawRoundRect(const RectF& rect, float radius, const CdlPaint& paint);
|
|
|
| // Draws the given path using the given |paint| parameters.
|
| - void DrawPath(const SkPath& path, const SkPaint& paint);
|
| + void DrawPath(const SkPath& path, const CdlPaint& paint);
|
|
|
| // Draws an image with the origin at the specified location. The upper left
|
| // corner of the bitmap is rendered at the specified location.
|
| @@ -331,7 +330,7 @@ class GFX_EXPORT Canvas {
|
| void DrawImageInt(const ImageSkia& image,
|
| int x,
|
| int y,
|
| - const SkPaint& paint);
|
| + const CdlPaint& paint);
|
|
|
| // Draws a portion of an image in the specified location. The src parameters
|
| // correspond to the region of the bitmap to draw in the region defined
|
| @@ -365,7 +364,7 @@ class GFX_EXPORT Canvas {
|
| int dest_w,
|
| int dest_h,
|
| bool filter,
|
| - const SkPaint& paint);
|
| + const CdlPaint& paint);
|
|
|
| // Same as the DrawImageInt functions above. Difference being this does not
|
| // do any scaling, i.e. it does not scale the output by the device scale
|
| @@ -378,7 +377,7 @@ class GFX_EXPORT Canvas {
|
| int dest_w,
|
| int dest_h,
|
| bool filter,
|
| - const SkPaint& paint);
|
| + const CdlPaint& paint);
|
|
|
| // Draws an |image| with the top left corner at |x| and |y|, clipped to
|
| // |path|.
|
| @@ -388,7 +387,7 @@ class GFX_EXPORT Canvas {
|
| int x,
|
| int y,
|
| const SkPath& path,
|
| - const SkPaint& paint);
|
| + const CdlPaint& paint);
|
|
|
| // Draws text with the specified color, fonts and location. The text is
|
| // aligned to the left, vertically centered, clipped to the region. If the
|
| @@ -465,7 +464,7 @@ class GFX_EXPORT Canvas {
|
| float tile_scale_y,
|
| int dest_x,
|
| int dest_y,
|
| - SkPaint* paint);
|
| + CdlPaint* paint);
|
|
|
| // Apply transformation on the canvas.
|
| void Transform(const Transform& transform);
|
| @@ -477,7 +476,7 @@ class GFX_EXPORT Canvas {
|
| const Rect& display_rect,
|
| int flags);
|
|
|
| - SkCanvas* sk_canvas() { return canvas_; }
|
| + CdlCanvas* sk_canvas() { return canvas_; }
|
| float image_scale() const { return image_scale_; }
|
|
|
| private:
|
| @@ -497,7 +496,7 @@ class GFX_EXPORT Canvas {
|
| int dest_w,
|
| int dest_h,
|
| bool filter,
|
| - const SkPaint& paint,
|
| + const CdlPaint& paint,
|
| bool remove_image_scale);
|
|
|
| // The device scale factor at which drawing on this canvas occurs.
|
| @@ -509,8 +508,8 @@ class GFX_EXPORT Canvas {
|
| // in which case canvas_owner_ will be set. Other times we are just
|
| // borrowing someone else's canvas, in which case canvas_ will point there
|
| // but canvas_owner_ will be null.
|
| - std::unique_ptr<SkCanvas> canvas_owner_;
|
| - SkCanvas* canvas_;
|
| + std::unique_ptr<CdlCanvas> canvas_owner_;
|
| + CdlCanvas* canvas_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Canvas);
|
| };
|
|
|