diff options
author | anicolao@chromium.org <anicolao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 19:14:57 +0000 |
---|---|---|
committer | anicolao@chromium.org <anicolao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 19:14:57 +0000 |
commit | 602627ccfcedd1183fa558a89ade93e9b8c4416a (patch) | |
tree | e6e1818199d874b9d735de2c4dff49b549ec10bc /gfx | |
parent | 23214631f9f132f7f08c8e13f2137b7334dd6aea (diff) | |
download | chromium_src-602627ccfcedd1183fa558a89ade93e9b8c4416a.zip chromium_src-602627ccfcedd1183fa558a89ade93e9b8c4416a.tar.gz chromium_src-602627ccfcedd1183fa558a89ade93e9b8c4416a.tar.bz2 |
Replace TabContentsViewGtk with TabContentsViewViews as part of the ongoing
effort to eliminate GTK for TOUCH_UI.
BUG=none
TEST=manually tested
Review URL: http://codereview.chromium.org/4319003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/canvas.h | 5 | ||||
-rw-r--r-- | gfx/canvas_direct2d.cc | 6 | ||||
-rw-r--r-- | gfx/canvas_direct2d.h | 2 | ||||
-rw-r--r-- | gfx/canvas_skia.cc | 8 | ||||
-rw-r--r-- | gfx/canvas_skia.h | 2 |
5 files changed, 22 insertions, 1 deletions
diff --git a/gfx/canvas.h b/gfx/canvas.h index 077a8a2..c68cdab 100644 --- a/gfx/canvas.h +++ b/gfx/canvas.h @@ -102,6 +102,11 @@ class Canvas { virtual void FillRectInt(const SkColor& color, int x, int y, int w, int h) = 0; + // Fills the specified region with the specified color and mode + virtual void FillRectInt(const SkColor& color, + int x, int y, int w, int h, + SkXfermode::Mode mode) = 0; + // Fills the specified region with the specified brush. virtual void FillRectInt(const gfx::Brush* brush, int x, int y, int w, int h) = 0; diff --git a/gfx/canvas_direct2d.cc b/gfx/canvas_direct2d.cc index 3dfcc851..585659d 100644 --- a/gfx/canvas_direct2d.cc +++ b/gfx/canvas_direct2d.cc @@ -209,6 +209,12 @@ void CanvasDirect2D::FillRectInt(const SkColor& color, rt_->FillRectangle(RectToRectF(x, y, w, h), solid_brush); } +void CanvasDirect2D::FillRectInt(const SkColor& color, + int x, int y, int w, int h, + SkXfermode::Mode mode) { + NOTIMPLEMENTED(); +} + void CanvasDirect2D::FillRectInt(const gfx::Brush* brush, int x, int y, int w, int h) { const Direct2DBrush* d2d_brush = static_cast<const Direct2DBrush*>(brush); diff --git a/gfx/canvas_direct2d.h b/gfx/canvas_direct2d.h index f7f0019..89ea448 100644 --- a/gfx/canvas_direct2d.h +++ b/gfx/canvas_direct2d.h @@ -33,6 +33,8 @@ class CanvasDirect2D : public Canvas { virtual void TranslateInt(int x, int y); virtual void ScaleInt(int x, int y); virtual void FillRectInt(const SkColor& color, int x, int y, int w, int h); + virtual void FillRectInt(const SkColor& color, int x, int y, int w, int h, + SkXfermode::Mode mode); virtual void FillRectInt(const gfx::Brush* brush, int x, int y, int w, int h); virtual void DrawRectInt(const SkColor& color, int x, int y, int w, int h); virtual void DrawRectInt(const SkColor& color, diff --git a/gfx/canvas_skia.cc b/gfx/canvas_skia.cc index dbf5d3a..017fd5f 100644 --- a/gfx/canvas_skia.cc +++ b/gfx/canvas_skia.cc @@ -105,10 +105,16 @@ void CanvasSkia::ScaleInt(int x, int y) { } void CanvasSkia::FillRectInt(const SkColor& color, int x, int y, int w, int h) { + FillRectInt(color, x, y, w, h, SkXfermode::kSrcOver_Mode); +} + +void CanvasSkia::FillRectInt(const SkColor& color, + int x, int y, int w, int h, + SkXfermode::Mode mode) { SkPaint paint; paint.setColor(color); paint.setStyle(SkPaint::kFill_Style); - paint.setXfermodeMode(SkXfermode::kSrcOver_Mode); + paint.setXfermodeMode(mode); DrawRectInt(x, y, w, h, paint); } diff --git a/gfx/canvas_skia.h b/gfx/canvas_skia.h index 153e812..7db41a0 100644 --- a/gfx/canvas_skia.h +++ b/gfx/canvas_skia.h @@ -95,6 +95,8 @@ class CanvasSkia : public skia::PlatformCanvas, virtual void TranslateInt(int x, int y); virtual void ScaleInt(int x, int y); virtual void FillRectInt(const SkColor& color, int x, int y, int w, int h); + virtual void FillRectInt(const SkColor& color, int x, int y, int w, int h, + SkXfermode::Mode mode); virtual void FillRectInt(const gfx::Brush* brush, int x, int y, int w, int h); virtual void DrawRectInt(const SkColor& color, int x, int y, int w, int h); virtual void DrawRectInt(const SkColor& color, |