summaryrefslogtreecommitdiffstats
path: root/ui/gfx
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 20:53:23 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 20:53:23 +0000
commit8ee65baac4ab9e3beb67674adbc6a210e2708604 (patch)
tree44400d118d7813a8d7e16a67f074c6696f8868b3 /ui/gfx
parentf1094b0275c82ead4b9aabbda24f5c2b3e8b4a1b (diff)
downloadchromium_src-8ee65baac4ab9e3beb67674adbc6a210e2708604.zip
chromium_src-8ee65baac4ab9e3beb67674adbc6a210e2708604.tar.gz
chromium_src-8ee65baac4ab9e3beb67674adbc6a210e2708604.tar.bz2
Include base/win/scoped_comptr.h instead of base/scoped_comptr_win.h.
Fix up all the callers to use the new location and namespace. Also, delete the stub file since it isn't included by anyone more. (Note: This was a TODO for brettw). BUG=None TEST=None R=brettw@chromium.org Review URL: http://codereview.chromium.org/6825055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx')
-rw-r--r--ui/gfx/canvas_direct2d.cc16
-rw-r--r--ui/gfx/canvas_direct2d.h6
-rw-r--r--ui/gfx/canvas_direct2d_unittest.cc2
3 files changed, 12 insertions, 12 deletions
diff --git a/ui/gfx/canvas_direct2d.cc b/ui/gfx/canvas_direct2d.cc
index 6c4d3bb..e58f94c 100644
--- a/ui/gfx/canvas_direct2d.cc
+++ b/ui/gfx/canvas_direct2d.cc
@@ -63,7 +63,7 @@ ID2D1Brush* CreateD2D1BrushFromSkBitmap(ID2D1RenderTarget* render_target,
const SkBitmap& bitmap,
D2D1_EXTEND_MODE extend_mode_x,
D2D1_EXTEND_MODE extend_mode_y) {
- ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
+ base::win::ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
CreateD2D1BitmapFromSkBitmap(render_target, bitmap));
ID2D1BitmapBrush* brush = NULL;
@@ -85,7 +85,7 @@ class Direct2DBrush : public gfx::Brush {
ID2D1Brush* brush() const { return brush_.get(); }
private:
- ScopedComPtr<ID2D1Brush> brush_;
+ base::win::ScopedComPtr<ID2D1Brush> brush_;
DISALLOW_COPY_AND_ASSIGN(Direct2DBrush);
};
@@ -204,7 +204,7 @@ void CanvasDirect2D::ScaleInt(int x, int y) {
void CanvasDirect2D::FillRectInt(const SkColor& color,
int x, int y, int w, int h) {
- ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
+ base::win::ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
rt_->FillRectangle(RectToRectF(x, y, w, h), solid_brush);
}
@@ -223,7 +223,7 @@ void CanvasDirect2D::FillRectInt(const gfx::Brush* brush,
void CanvasDirect2D::DrawRectInt(const SkColor& color,
int x, int y, int w, int h) {
- ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
+ base::win::ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
rt_->DrawRectangle(RectToRectF(x, y, w, h), solid_brush);
}
@@ -242,13 +242,13 @@ void CanvasDirect2D::DrawRectInt(int x, int y, int w, int h,
void CanvasDirect2D::DrawLineInt(const SkColor& color,
int x1, int y1,
int x2, int y2) {
- ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
+ base::win::ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
rt_->DrawLine(PointToPoint2F(x1, y1), PointToPoint2F(x2, y2), solid_brush);
}
void CanvasDirect2D::DrawBitmapInt(const SkBitmap& bitmap, int x, int y) {
- ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
+ base::win::ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
CreateD2D1BitmapFromSkBitmap(rt_, bitmap));
rt_->DrawBitmap(d2d1_bitmap,
RectToRectF(x, y, bitmap.width(), bitmap.height()),
@@ -268,7 +268,7 @@ void CanvasDirect2D::DrawBitmapInt(const SkBitmap& bitmap,
int dest_x, int dest_y,
int dest_w, int dest_h,
bool filter) {
- ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
+ base::win::ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
CreateD2D1BitmapFromSkBitmap(rt_, bitmap));
rt_->DrawBitmap(d2d1_bitmap,
RectToRectF(dest_x, dest_y, dest_w, dest_h),
@@ -314,7 +314,7 @@ void CanvasDirect2D::DrawFocusRect(int x, int y, int width, int height) {
void CanvasDirect2D::TileImageInt(const SkBitmap& bitmap,
int x, int y, int w, int h) {
- ScopedComPtr<ID2D1Brush> brush(
+ base::win::ScopedComPtr<ID2D1Brush> brush(
CreateD2D1BrushFromSkBitmap(rt_, bitmap, D2D1_EXTEND_MODE_WRAP,
D2D1_EXTEND_MODE_WRAP));
rt_->FillRectangle(RectToRectF(x, y, w, h), brush);
diff --git a/ui/gfx/canvas_direct2d.h b/ui/gfx/canvas_direct2d.h
index 88ab8bf..83a439c 100644
--- a/ui/gfx/canvas_direct2d.h
+++ b/ui/gfx/canvas_direct2d.h
@@ -10,7 +10,7 @@
#include <stack>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "ui/gfx/canvas.h"
namespace gfx {
@@ -86,8 +86,8 @@ class CanvasDirect2D : public Canvas {
void SaveInternal(ID2D1Layer* layer);
ID2D1RenderTarget* rt_;
- ScopedComPtr<ID2D1GdiInteropRenderTarget> interop_rt_;
- ScopedComPtr<ID2D1DrawingStateBlock> drawing_state_block_;
+ base::win::ScopedComPtr<ID2D1GdiInteropRenderTarget> interop_rt_;
+ base::win::ScopedComPtr<ID2D1DrawingStateBlock> drawing_state_block_;
static ID2D1Factory* d2d1_factory_;
// Every time Save* is called, a RenderState object is pushed onto the
diff --git a/ui/gfx/canvas_direct2d_unittest.cc b/ui/gfx/canvas_direct2d_unittest.cc
index a678252..740f766 100644
--- a/ui/gfx/canvas_direct2d_unittest.cc
+++ b/ui/gfx/canvas_direct2d_unittest.cc
@@ -99,7 +99,7 @@ class TestWindow {
HWND hwnd_;
- ScopedComPtr<ID2D1RenderTarget> rt_;
+ base::win::ScopedComPtr<ID2D1RenderTarget> rt_;
DISALLOW_COPY_AND_ASSIGN(TestWindow);
};