diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 18:28:20 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 18:28:20 +0000 |
commit | f286f77eec2281993efe4dd408448903334d55eb (patch) | |
tree | f6d1a521ae0842a8313880bbb1436fef2c3ee497 /gfx/canvas_skia.h | |
parent | 0940ddebe40365351c6fc53bfaf39bd7cd176249 (diff) | |
download | chromium_src-f286f77eec2281993efe4dd408448903334d55eb.zip chromium_src-f286f77eec2281993efe4dd408448903334d55eb.tar.gz chromium_src-f286f77eec2281993efe4dd408448903334d55eb.tar.bz2 |
Implement initial ClipRect.
Move IntersectsClipRectInt and GetClipRect functions to CanvasSkia private, since they are only used internally.
BUG=none
TEST=see unittest.
Review URL: http://codereview.chromium.org/2959014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/canvas_skia.h')
-rw-r--r-- | gfx/canvas_skia.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gfx/canvas_skia.h b/gfx/canvas_skia.h index 115bd83..0e2f7e9 100644 --- a/gfx/canvas_skia.h +++ b/gfx/canvas_skia.h @@ -84,9 +84,7 @@ class CanvasSkia : public skia::PlatformCanvas, virtual void SaveLayerAlpha(uint8 alpha); virtual void SaveLayerAlpha(uint8 alpha, const gfx::Rect& layer_bounds); virtual void Restore(); - virtual bool GetClipRect(gfx::Rect* clip_rect); virtual bool ClipRectInt(int x, int y, int w, int h); - virtual bool IntersectsClipRectInt(int x, int y, int w, int h); virtual void TranslateInt(int x, int y); virtual void ScaleInt(int x, int y); virtual void FillRectInt(int x, int y, int w, int h, @@ -128,6 +126,9 @@ class CanvasSkia : public skia::PlatformCanvas, virtual const CanvasSkia* AsCanvasSkia() const; private: + // Test whether the provided rectangle intersects the current clip rect. + bool IntersectsClipRectInt(int x, int y, int w, int h); + #if defined(OS_WIN) // Draws text with the specified color, font and location. The text is // aligned to the left, vertically centered, clipped to the region. If the |