summaryrefslogtreecommitdiffstats
path: root/base/gfx
diff options
context:
space:
mode:
authorawalker@google.com <awalker@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 22:33:08 +0000
committerawalker@google.com <awalker@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 22:33:08 +0000
commitf9987b49140ea45f9f597e67dd85c2428a8cb242 (patch)
tree543212075d05d30ca172895e8860381f5accc8dd /base/gfx
parentbc7fbcc8ffb62e1461eedfd398e9c8d85ee27467 (diff)
downloadchromium_src-f9987b49140ea45f9f597e67dd85c2428a8cb242.zip
chromium_src-f9987b49140ea45f9f597e67dd85c2428a8cb242.tar.gz
chromium_src-f9987b49140ea45f9f597e67dd85c2428a8cb242.tar.bz2
Fix build break, add TODO to clean up unit test reference
handling Review URL: http://codereview.chromium.org/1682 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx')
-rw-r--r--base/gfx/platform_canvas_unittest.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/base/gfx/platform_canvas_unittest.cc b/base/gfx/platform_canvas_unittest.cc
index e9c35de..81e5c75 100644
--- a/base/gfx/platform_canvas_unittest.cc
+++ b/base/gfx/platform_canvas_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// TODO(awalker): clean up the const/non-const reference handling in this test
+
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -59,7 +61,7 @@ bool VerifyCanvasColor(const PlatformCanvas& canvas, uint32_t canvas_color) {
}
#if defined(OS_WIN)
-void DrawNativeRect(const PlatformCanvas& canvas, int x, int y, int w, int h) {
+void DrawNativeRect(PlatformCanvas& canvas, int x, int y, int w, int h) {
HDC dc = canvas.beginPlatformPaint();
RECT inner_rc;
@@ -72,7 +74,7 @@ void DrawNativeRect(const PlatformCanvas& canvas, int x, int y, int w, int h) {
canvas.endPlatformPaint();
}
#elif defined(OS_MACOSX)
-void DrawNativeRect(const PlatformCanvas& canvas, int x, int y, int w, int h) {
+void DrawNativeRect(PlatformCanvas& canvas, int x, int y, int w, int h) {
CGContextRef context = canvas.beginPlatformPaint();
CGRect inner_rc = CGRectMake(x, y, w, h);
@@ -83,14 +85,14 @@ void DrawNativeRect(const PlatformCanvas& canvas, int x, int y, int w, int h) {
canvas.endPlatformPaint();
}
#else
-void DrawNativeRect(const PlatformCanvas& canvas, int x, int y, int w, int h) {
+void DrawNativeRect(PlatformCanvas& canvas, int x, int y, int w, int h) {
NOTIMPLEMENTED();
}
#endif
// Clips the contents of the canvas to the given rectangle. This will be
// intersected with any existing clip.
-void AddClip(const PlatformCanvas& canvas, int x, int y, int w, int h) {
+void AddClip(PlatformCanvas& canvas, int x, int y, int w, int h) {
SkRect rect;
rect.set(SkIntToScalar(x), SkIntToScalar(y),
SkIntToScalar(x + w), SkIntToScalar(y + h));
@@ -99,7 +101,7 @@ void AddClip(const PlatformCanvas& canvas, int x, int y, int w, int h) {
class LayerSaver {
public:
- LayerSaver(const PlatformCanvas& canvas, int x, int y, int w, int h)
+ LayerSaver(PlatformCanvas& canvas, int x, int y, int w, int h)
: canvas_(canvas),
x_(x),
y_(y),
@@ -126,7 +128,7 @@ class LayerSaver {
int bottom() const { return y_ + h_; }
private:
- const PlatformCanvas& canvas_;
+ PlatformCanvas& canvas_;
int x_, y_, w_, h_;
};