summaryrefslogtreecommitdiffstats
path: root/ui/gfx/canvas.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-17 21:52:11 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-17 21:52:11 +0000
commit6fa9fa1116bfe9f55835fb1586f76ae23a77161f (patch)
tree5a454b93483ac53a6ac3ccba3f4768a8ebd1ae1e /ui/gfx/canvas.cc
parent86dd17c3a84074f250d91ccff80d776ddba134ee (diff)
downloadchromium_src-6fa9fa1116bfe9f55835fb1586f76ae23a77161f.zip
chromium_src-6fa9fa1116bfe9f55835fb1586f76ae23a77161f.tar.gz
chromium_src-6fa9fa1116bfe9f55835fb1586f76ae23a77161f.tar.bz2
ui/gfx: Kill Canvas::FillRect() function that takes gfx::Brush.
BUG=100898 R=pkasting@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9718014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/canvas.cc')
-rw-r--r--ui/gfx/canvas.cc33
1 files changed, 0 insertions, 33 deletions
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index 68087ba..7ea77d9 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
-#include "ui/gfx/brush.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/rect.h"
@@ -21,30 +20,6 @@
#include "ui/gfx/canvas_skia_paint.h"
#endif
-namespace {
-
-// A platform wrapper for a Skia shader that makes sure the underlying
-// SkShader object is unref'ed when this object is destroyed.
-class SkiaShader : public gfx::Brush {
- public:
- explicit SkiaShader(SkShader* shader) : shader_(shader) {
- }
- virtual ~SkiaShader() {
- shader_->unref();
- }
-
- // Accessor for shader, so it can be associated with a SkPaint.
- SkShader* shader() const { return shader_; }
-
- private:
- SkShader* shader_;
-
- DISALLOW_COPY_AND_ASSIGN(SkiaShader);
-};
-
-
-} // namespace
-
namespace gfx {
Canvas::Canvas(const gfx::Size& size, bool is_opaque)
@@ -194,14 +169,6 @@ void Canvas::FillRect(const gfx::Rect& rect,
DrawRect(rect, paint);
}
-void Canvas::FillRect(const gfx::Rect& rect, const gfx::Brush* brush) {
- const SkiaShader* shader = static_cast<const SkiaShader*>(brush);
- SkPaint paint;
- paint.setShader(shader->shader());
- // TODO(beng): set shader transform to match canvas transform.
- DrawRect(rect, paint);
-}
-
void Canvas::DrawRect(const gfx::Rect& rect, const SkColor& color) {
DrawRect(rect, color, SkXfermode::kSrcOver_Mode);
}