Commit 788debf1 authored by hendrikw's avatar hendrikw Committed by Commit bot

Functions that return non-const internal data should not be const

as it provides a loophole around const.

I've removed const from platform_canvas() and sk_canvas(), if
anyone tries to access these from a const instance of Canvas, it
won't compile.

Review URL: https://codereview.chromium.org/560463004

Cr-Commit-Position: refs/heads/master@{#295104}
parent badbcb81
...@@ -421,8 +421,8 @@ class GFX_EXPORT Canvas { ...@@ -421,8 +421,8 @@ class GFX_EXPORT Canvas {
const Rect& display_rect, const Rect& display_rect,
int flags); int flags);
skia::PlatformCanvas* platform_canvas() const { return owned_canvas_.get(); } skia::PlatformCanvas* platform_canvas() { return owned_canvas_.get(); }
SkCanvas* sk_canvas() const { return canvas_; } SkCanvas* sk_canvas() { return canvas_; }
float image_scale() const { return image_scale_; } float image_scale() const { return image_scale_; }
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment