summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/build/base_gfx.vcproj12
-rw-r--r--base/gfx/bitmap_platform_device_win.cc (renamed from base/gfx/bitmap_platform_device.cc)74
-rw-r--r--base/gfx/bitmap_platform_device_win.h (renamed from base/gfx/bitmap_platform_device.h)26
-rw-r--r--base/gfx/native_theme.cc4
-rw-r--r--base/gfx/native_theme.h4
-rw-r--r--base/gfx/platform_canvas_unittest.cc36
-rw-r--r--base/gfx/platform_canvas_win.cc (renamed from base/gfx/platform_canvas.cc)34
-rw-r--r--base/gfx/platform_canvas_win.h (renamed from base/gfx/platform_canvas.h)28
-rw-r--r--base/gfx/platform_device_win.cc (renamed from base/gfx/platform_device.cc)14
-rw-r--r--base/gfx/platform_device_win.h (renamed from base/gfx/platform_device.h)10
-rw-r--r--base/gfx/vector_canvas.cc8
-rw-r--r--base/gfx/vector_canvas.h4
-rw-r--r--base/gfx/vector_canvas_unittest.cc14
-rw-r--r--base/gfx/vector_device.cc4
-rw-r--r--base/gfx/vector_device.h4
-rw-r--r--chrome/browser/printing/printed_document.cc4
-rw-r--r--chrome/browser/printing/printing_layout_uitest.cc4
-rw-r--r--chrome/browser/printing/win_printing_context.cc4
-rw-r--r--chrome/browser/views/theme_helpers.cc6
-rw-r--r--chrome/common/gfx/chrome_canvas.cc4
-rw-r--r--chrome/common/gfx/chrome_canvas.h4
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc8
-rw-r--r--chrome/renderer/render_view.cc8
-rw-r--r--chrome/renderer/render_widget.cc4
-rw-r--r--webkit/glue/webframe.h4
-rw-r--r--webkit/glue/webframe_impl.cc14
-rw-r--r--webkit/glue/webframe_impl.h8
-rw-r--r--webkit/glue/webview_impl.cc2
-rw-r--r--webkit/glue/webview_impl.h2
-rw-r--r--webkit/glue/webwidget.h4
-rw-r--r--webkit/glue/webwidget_impl.cc4
-rw-r--r--webkit/glue/webwidget_impl.h2
-rw-r--r--webkit/pending/CanvasRenderingContext2D.cpp2
-rw-r--r--webkit/port/platform/PlatformScrollBar.h2
-rw-r--r--webkit/port/platform/PlatformScrollBarWin.cpp6
-rw-r--r--webkit/port/platform/ScrollViewWin.cpp4
-rw-r--r--webkit/port/platform/graphics/FontWin.cpp2
-rw-r--r--webkit/port/platform/graphics/GraphicsContextSkia.cpp4
-rw-r--r--webkit/port/platform/graphics/ImageSkia.cpp6
-rw-r--r--webkit/port/platform/graphics/PlatformContextSkia.cpp2
-rw-r--r--webkit/port/platform/graphics/PlatformContextSkia.h2
-rw-r--r--webkit/port/platform/graphics/SkGraphicsContext.cpp6
-rw-r--r--webkit/port/platform/graphics/SkGraphicsContext.h8
-rw-r--r--webkit/port/platform/graphics/SkPaintContext.cpp4
-rw-r--r--webkit/port/platform/graphics/SkPaintContext.h8
-rw-r--r--webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp2
-rw-r--r--webkit/port/platform/graphics/svg/SkiaSupport.cpp2
-rw-r--r--webkit/tools/test_shell/test_shell.cc4
-rw-r--r--webkit/tools/test_shell/webview_host.cc2
-rw-r--r--webkit/tools/test_shell/webwidget_host.cc4
-rw-r--r--webkit/tools/test_shell/webwidget_host.h4
51 files changed, 218 insertions, 218 deletions
diff --git a/base/build/base_gfx.vcproj b/base/build/base_gfx.vcproj
index ac60c50..329449b 100644
--- a/base/build/base_gfx.vcproj
+++ b/base/build/base_gfx.vcproj
@@ -130,11 +130,11 @@
>
</File>
<File
- RelativePath="..\gfx\bitmap_platform_device.cc"
+ RelativePath="..\gfx\bitmap_platform_device_win.cc"
>
</File>
<File
- RelativePath="..\gfx\bitmap_platform_device.h"
+ RelativePath="..\gfx\bitmap_platform_device_win.h"
>
</File>
<File
@@ -170,19 +170,19 @@
>
</File>
<File
- RelativePath="..\gfx\platform_canvas.cc"
+ RelativePath="..\gfx\platform_canvas_win.cc"
>
</File>
<File
- RelativePath="..\gfx\platform_canvas.h"
+ RelativePath="..\gfx\platform_canvas_win.h"
>
</File>
<File
- RelativePath="..\gfx\platform_device.cc"
+ RelativePath="..\gfx\platform_device_win.cc"
>
</File>
<File
- RelativePath="..\gfx\platform_device.h"
+ RelativePath="..\gfx\platform_device_win.h"
>
</File>
<File
diff --git a/base/gfx/bitmap_platform_device.cc b/base/gfx/bitmap_platform_device_win.cc
index 0a914e2..acc5eaf 100644
--- a/base/gfx/bitmap_platform_device.cc
+++ b/base/gfx/bitmap_platform_device_win.cc
@@ -27,7 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "base/gfx/bitmap_platform_device.h"
+#include "base/gfx/bitmap_platform_device_win.h"
#include "base/gfx/bitmap_header.h"
#include "base/logging.h"
@@ -125,10 +125,10 @@ void FixupAlphaBeforeCompositing(uint32_t* pixel) {
} // namespace
-class BitmapPlatformDevice::BitmapPlatformDeviceData
- : public base::RefCounted<BitmapPlatformDeviceData> {
+class BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData
+ : public base::RefCounted<BitmapPlatformDeviceWinData> {
public:
- explicit BitmapPlatformDeviceData(HBITMAP hbitmap);
+ explicit BitmapPlatformDeviceWinData(HBITMAP hbitmap);
// Create/destroy hdc_, which is the memory DC for our bitmap data.
HDC GetBitmapDC();
@@ -175,13 +175,13 @@ class BitmapPlatformDevice::BitmapPlatformDeviceData
SkRegion clip_region_;
private:
- friend class base::RefCounted<BitmapPlatformDeviceData>;
- ~BitmapPlatformDeviceData();
+ friend class base::RefCounted<BitmapPlatformDeviceWinData>;
+ ~BitmapPlatformDeviceWinData();
- DISALLOW_EVIL_CONSTRUCTORS(BitmapPlatformDeviceData);
+ DISALLOW_EVIL_CONSTRUCTORS(BitmapPlatformDeviceWinData);
};
-BitmapPlatformDevice::BitmapPlatformDeviceData::BitmapPlatformDeviceData(
+BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::BitmapPlatformDeviceWinData(
HBITMAP hbitmap)
: hbitmap_(hbitmap),
hdc_(NULL),
@@ -199,7 +199,7 @@ BitmapPlatformDevice::BitmapPlatformDeviceData::BitmapPlatformDeviceData(
transform_.reset();
}
-BitmapPlatformDevice::BitmapPlatformDeviceData::~BitmapPlatformDeviceData() {
+BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::~BitmapPlatformDeviceWinData() {
if (hdc_)
ReleaseBitmapDC();
@@ -207,7 +207,7 @@ BitmapPlatformDevice::BitmapPlatformDeviceData::~BitmapPlatformDeviceData() {
DeleteObject(hbitmap_);
}
-HDC BitmapPlatformDevice::BitmapPlatformDeviceData::GetBitmapDC() {
+HDC BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::GetBitmapDC() {
if (!hdc_) {
hdc_ = CreateCompatibleDC(NULL);
InitializeDC(hdc_);
@@ -222,18 +222,18 @@ HDC BitmapPlatformDevice::BitmapPlatformDeviceData::GetBitmapDC() {
return hdc_;
}
-void BitmapPlatformDevice::BitmapPlatformDeviceData::ReleaseBitmapDC() {
+void BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::ReleaseBitmapDC() {
DCHECK(hdc_);
DeleteDC(hdc_);
hdc_ = NULL;
}
-bool BitmapPlatformDevice::BitmapPlatformDeviceData::IsBitmapDCCreated() const {
+bool BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::IsBitmapDCCreated() const {
return hdc_ != NULL;
}
-void BitmapPlatformDevice::BitmapPlatformDeviceData::SetMatrixClip(
+void BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::SetMatrixClip(
const SkMatrix& transform,
const SkRegion& region) {
transform_ = transform;
@@ -241,14 +241,14 @@ void BitmapPlatformDevice::BitmapPlatformDeviceData::SetMatrixClip(
config_dirty_ = true;
}
-void BitmapPlatformDevice::BitmapPlatformDeviceData::SetDeviceOffset(int x,
+void BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::SetDeviceOffset(int x,
int y) {
offset_x_ = x;
offset_y_ = y;
config_dirty_ = true;
}
-void BitmapPlatformDevice::BitmapPlatformDeviceData::LoadConfig() {
+void BitmapPlatformDeviceWin::BitmapPlatformDeviceWinData::LoadConfig() {
if (!config_dirty_ || !hdc_)
return; // Nothing to do.
config_dirty_ = false;
@@ -268,7 +268,7 @@ void BitmapPlatformDevice::BitmapPlatformDeviceData::LoadConfig() {
// that we can create the pixel data before calling the constructor. This is
// required so that we can call the base class' constructor with the pixel
// data.
-BitmapPlatformDevice* BitmapPlatformDevice::create(HDC screen_dc,
+BitmapPlatformDeviceWin* BitmapPlatformDeviceWin::create(HDC screen_dc,
int width,
int height,
bool is_opaque,
@@ -315,49 +315,49 @@ BitmapPlatformDevice* BitmapPlatformDevice::create(HDC screen_dc,
}
// The device object will take ownership of the HBITMAP.
- return new BitmapPlatformDevice(new BitmapPlatformDeviceData(hbitmap), bitmap);
+ return new BitmapPlatformDeviceWin(new BitmapPlatformDeviceWinData(hbitmap), bitmap);
}
// The device will own the HBITMAP, which corresponds to also owning the pixel
// data. Therefore, we do not transfer ownership to the SkDevice's bitmap.
-BitmapPlatformDevice::BitmapPlatformDevice(BitmapPlatformDeviceData* data,
+BitmapPlatformDeviceWin::BitmapPlatformDeviceWin(BitmapPlatformDeviceWinData* data,
const SkBitmap& bitmap)
- : PlatformDevice(bitmap),
+ : PlatformDeviceWin(bitmap),
data_(data) {
}
// The copy constructor just adds another reference to the underlying data.
// We use a const cast since the default Skia definitions don't define the
// proper constedness that we expect (accessBitmap should really be const).
-BitmapPlatformDevice::BitmapPlatformDevice(const BitmapPlatformDevice& other)
- : PlatformDevice(
- const_cast<BitmapPlatformDevice&>(other).accessBitmap(true)),
+BitmapPlatformDeviceWin::BitmapPlatformDeviceWin(const BitmapPlatformDeviceWin& other)
+ : PlatformDeviceWin(
+ const_cast<BitmapPlatformDeviceWin&>(other).accessBitmap(true)),
data_(other.data_) {
}
-BitmapPlatformDevice::~BitmapPlatformDevice() {
+BitmapPlatformDeviceWin::~BitmapPlatformDeviceWin() {
}
-BitmapPlatformDevice& BitmapPlatformDevice::operator=(
- const BitmapPlatformDevice& other) {
+BitmapPlatformDeviceWin& BitmapPlatformDeviceWin::operator=(
+ const BitmapPlatformDeviceWin& other) {
data_ = other.data_;
return *this;
}
-HDC BitmapPlatformDevice::getBitmapDC() {
+HDC BitmapPlatformDeviceWin::getBitmapDC() {
return data_->GetBitmapDC();
}
-void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
+void BitmapPlatformDeviceWin::setMatrixClip(const SkMatrix& transform,
const SkRegion& region) {
data_->SetMatrixClip(transform, region);
}
-void BitmapPlatformDevice::setDeviceOffset(int x, int y) {
+void BitmapPlatformDeviceWin::setDeviceOffset(int x, int y) {
data_->SetDeviceOffset(x, y);
}
-void BitmapPlatformDevice::drawToHDC(HDC dc, int x, int y,
+void BitmapPlatformDeviceWin::drawToHDC(HDC dc, int x, int y,
const RECT* src_rect) {
bool created_dc = !data_->IsBitmapDCCreated();
HDC source_dc = getBitmapDC();
@@ -410,19 +410,19 @@ void BitmapPlatformDevice::drawToHDC(HDC dc, int x, int y,
data_->ReleaseBitmapDC();
}
-void BitmapPlatformDevice::prepareForGDI(int x, int y, int width, int height) {
+void BitmapPlatformDeviceWin::prepareForGDI(int x, int y, int width, int height) {
processPixels<PrepareAlphaForGDI>(x, y, width, height);
}
-void BitmapPlatformDevice::postProcessGDI(int x, int y, int width, int height) {
+void BitmapPlatformDeviceWin::postProcessGDI(int x, int y, int width, int height) {
processPixels<PostProcessAlphaForGDI>(x, y, width, height);
}
-void BitmapPlatformDevice::makeOpaque(int x, int y, int width, int height) {
+void BitmapPlatformDeviceWin::makeOpaque(int x, int y, int width, int height) {
processPixels<MakeOpaqueAlphaAdjuster>(x, y, width, height);
}
-void BitmapPlatformDevice::fixupAlphaBeforeCompositing() {
+void BitmapPlatformDeviceWin::fixupAlphaBeforeCompositing() {
const SkBitmap& bitmap = accessBitmap(true);
SkAutoLockPixels lock(bitmap);
uint32_t* data = bitmap.getAddr32(0, 0);
@@ -437,22 +437,22 @@ void BitmapPlatformDevice::fixupAlphaBeforeCompositing() {
}
// Returns the color value at the specified location.
-SkColor BitmapPlatformDevice::getColorAt(int x, int y) {
+SkColor BitmapPlatformDeviceWin::getColorAt(int x, int y) {
const SkBitmap& bitmap = accessBitmap(false);
SkAutoLockPixels lock(bitmap);
uint32_t* data = bitmap.getAddr32(0, 0);
return static_cast<SkColor>(data[x + y * width()]);
}
-void BitmapPlatformDevice::onAccessBitmap(SkBitmap* bitmap) {
+void BitmapPlatformDeviceWin::onAccessBitmap(SkBitmap* bitmap) {
// FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI
// operation has occurred on our DC.
if (data_->IsBitmapDCCreated())
GdiFlush();
}
-template<BitmapPlatformDevice::adjustAlpha adjustor>
-void BitmapPlatformDevice::processPixels(int x,
+template<BitmapPlatformDeviceWin::adjustAlpha adjustor>
+void BitmapPlatformDeviceWin::processPixels(int x,
int y,
int width,
int height) {
diff --git a/base/gfx/bitmap_platform_device.h b/base/gfx/bitmap_platform_device_win.h
index 481067a..9b43b95 100644
--- a/base/gfx/bitmap_platform_device.h
+++ b/base/gfx/bitmap_platform_device_win.h
@@ -27,17 +27,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef BASE_GFX_BITMAP_PLATFORM_DEVICE_H__
-#define BASE_GFX_BITMAP_PLATFORM_DEVICE_H__
+#ifndef BASE_GFX_BITMAP_PLATFORM_DEVICE_WIN_H__
+#define BASE_GFX_BITMAP_PLATFORM_DEVICE_WIN_H__
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "base/ref_counted.h"
namespace gfx {
// A device is basically a wrapper around SkBitmap that provides a surface for
// SkCanvas to draw into. Our device provides a surface Windows can also write
-// to. BitmapPlatformDevice creates a bitmap using CreateDIBSection() in a
+// to. BitmapPlatformDeviceWin creates a bitmap using CreateDIBSection() in a
// format that Skia supports and can then use this to draw ClearType into, etc.
// This pixel data is provided to the bitmap that the device contains so that it
// can be shared.
@@ -49,7 +49,7 @@ namespace gfx {
// For us, that other bitmap will become invalid as soon as the device becomes
// invalid, which may lead to subtle bugs. Therefore, DO NOT ASSIGN THE
// DEVICE'S PIXEL DATA TO ANOTHER BITMAP, make sure you copy instead.
-class BitmapPlatformDevice : public PlatformDevice {
+class BitmapPlatformDeviceWin : public PlatformDeviceWin {
public:
// Factory function. The screen DC is used to create the bitmap, and will not
// be stored beyond this function. is_opaque should be set if the caller
@@ -58,7 +58,7 @@ class BitmapPlatformDevice : public PlatformDevice {
// The shared_section parameter is optional (pass NULL for default behavior).
// If shared_section is non-null, then it must be a handle to a file-mapping
// object returned by CreateFileMapping. See CreateDIBSection for details.
- static BitmapPlatformDevice* create(HDC screen_dc,
+ static BitmapPlatformDeviceWin* create(HDC screen_dc,
int width,
int height,
bool is_opaque,
@@ -75,11 +75,11 @@ class BitmapPlatformDevice : public PlatformDevice {
//
// Copy constucting and "=" is designed for saving the device or passing it
// around to another routine willing to deal with the bitmap data directly.
- BitmapPlatformDevice(const BitmapPlatformDevice& other);
- virtual ~BitmapPlatformDevice();
+ BitmapPlatformDeviceWin(const BitmapPlatformDeviceWin& other);
+ virtual ~BitmapPlatformDeviceWin();
// See warning for copy constructor above.
- BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other);
+ BitmapPlatformDeviceWin& operator=(const BitmapPlatformDeviceWin& other);
// Retrieves the bitmap DC, which is the memory DC for our bitmap data. The
// bitmap DC is lazy created.
@@ -112,10 +112,10 @@ class BitmapPlatformDevice : public PlatformDevice {
// Reference counted data that can be shared between multiple devices. This
// allows copy constructors and operator= for devices to work properly. The
// bitmaps used by the base device class are already refcounted and copyable.
- class BitmapPlatformDeviceData;
+ class BitmapPlatformDeviceWinData;
// Private constructor.
- BitmapPlatformDevice(BitmapPlatformDeviceData* data, const SkBitmap& bitmap);
+ BitmapPlatformDeviceWin(BitmapPlatformDeviceWinData* data, const SkBitmap& bitmap);
// Loops through each of the pixels in the specified range, invoking
// adjustor for the alpha value of each pixel. If |width| or |height| are -1,
@@ -127,9 +127,9 @@ class BitmapPlatformDevice : public PlatformDevice {
int height);
// Data associated with this device, guaranteed non-null.
- scoped_refptr<BitmapPlatformDeviceData> data_;
+ scoped_refptr<BitmapPlatformDeviceWinData> data_;
};
} // namespace gfx
-#endif // BASE_GFX_BITMAP_PLATFORM_DEVICE_H__
+#endif // BASE_GFX_BITMAP_PLATFORM_DEVICE_WIN_H__
diff --git a/base/gfx/native_theme.cc b/base/gfx/native_theme.cc
index 821a039..ba9f106 100644
--- a/base/gfx/native_theme.cc
+++ b/base/gfx/native_theme.cc
@@ -35,7 +35,7 @@
#include <vssym32.h>
#include "base/gfx/bitmap_header.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/gfx/skia_utils.h"
#include "base/gfx/rect.h"
#include "base/logging.h"
@@ -215,7 +215,7 @@ HRESULT NativeTheme::PaintScrollbarTrack(HDC hdc,
int classic_state,
RECT* target_rect,
RECT* align_rect,
- PlatformCanvas* canvas) const {
+ PlatformCanvasWin* canvas) const {
HANDLE handle = GetThemeHandle(SCROLLBAR);
if (handle && draw_theme_)
return draw_theme_(handle, hdc, part_id, state_id, target_rect, NULL);
diff --git a/base/gfx/native_theme.h b/base/gfx/native_theme.h
index 918a282..09e3522 100644
--- a/base/gfx/native_theme.h
+++ b/base/gfx/native_theme.h
@@ -43,7 +43,7 @@
#include "skia/include/SkColor.h"
namespace gfx {
-class PlatformCanvas;
+class PlatformCanvasWin;
// TODO: Define class member enums to replace part_id and state_id parameters
// that are currently defined in <vssym32.h>. Afterward, classic_state should
@@ -153,7 +153,7 @@ class NativeTheme {
int classic_state,
RECT* target_rect,
RECT* align_rect,
- PlatformCanvas* canvas) const;
+ PlatformCanvasWin* canvas) const;
// |arrow_direction| determines whether the arrow is pointing to the left or
// to the right. In RTL locales, sub-menus open from right to left and
diff --git a/base/gfx/platform_canvas_unittest.cc b/base/gfx/platform_canvas_unittest.cc
index 2d127a7..9b0a0d3 100644
--- a/base/gfx/platform_canvas_unittest.cc
+++ b/base/gfx/platform_canvas_unittest.cc
@@ -29,8 +29,8 @@
#include <windows.h>
-#include "base/gfx/platform_canvas.h"
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_canvas_win.h"
+#include "base/gfx/platform_device_win.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "SkColor.h"
@@ -41,10 +41,10 @@ namespace {
// Return true if the canvas is filled to canvas_color,
// and contains a single rectangle filled to rect_color.
-bool VerifyRect(const PlatformCanvas& canvas,
+bool VerifyRect(const PlatformCanvasWin& canvas,
uint32_t canvas_color, uint32_t rect_color,
int x, int y, int w, int h) {
- PlatformDevice& device = canvas.getTopPlatformDevice();
+ PlatformDeviceWin& device = canvas.getTopPlatformDevice();
const SkBitmap& bitmap = device.accessBitmap(false);
SkAutoLockPixels lock(bitmap);
@@ -68,16 +68,16 @@ bool VerifyRect(const PlatformCanvas& canvas,
// Checks whether there is a white canvas with a black square at the given
// location in pixels (not in the canvas coordinate system).
// TODO(ericroman): rename Square to Rect
-bool VerifyBlackSquare(const PlatformCanvas& canvas, int x, int y, int w, int h) {
+bool VerifyBlackSquare(const PlatformCanvasWin& canvas, int x, int y, int w, int h) {
return VerifyRect(canvas, SK_ColorWHITE, SK_ColorBLACK, x, y, w, h);
}
// Check that every pixel in the canvas is a single color.
-bool VerifyCanvasColor(const PlatformCanvas& canvas, uint32_t canvas_color) {
+bool VerifyCanvasColor(const PlatformCanvasWin& canvas, uint32_t canvas_color) {
return VerifyRect(canvas, canvas_color, 0, 0, 0, 0, 0);
}
-void DrawGDIRect(PlatformCanvas& canvas, int x, int y, int w, int h) {
+void DrawGDIRect(PlatformCanvasWin& canvas, int x, int y, int w, int h) {
HDC dc = canvas.beginPlatformPaint();
RECT inner_rc;
@@ -92,7 +92,7 @@ void DrawGDIRect(PlatformCanvas& canvas, int x, int y, int w, int h) {
// Clips the contents of the canvas to the given rectangle. This will be
// intersected with any existing clip.
-void AddClip(PlatformCanvas& canvas, int x, int y, int w, int h) {
+void AddClip(PlatformCanvasWin& canvas, int x, int y, int w, int h) {
SkRect rect;
rect.set(SkIntToScalar(x), SkIntToScalar(y),
SkIntToScalar(x + w), SkIntToScalar(y + h));
@@ -101,7 +101,7 @@ void AddClip(PlatformCanvas& canvas, int x, int y, int w, int h) {
class LayerSaver {
public:
- LayerSaver(PlatformCanvas& canvas, int x, int y, int w, int h)
+ LayerSaver(PlatformCanvasWin& canvas, int x, int y, int w, int h)
: canvas_(canvas),
x_(x),
y_(y),
@@ -128,7 +128,7 @@ class LayerSaver {
int bottom() const { return y_ + h_; }
private:
- PlatformCanvas& canvas_;
+ PlatformCanvasWin& canvas_;
int x_, y_, w_, h_;
};
@@ -148,9 +148,9 @@ const int kInnerH = 3;
// This just checks that our checking code is working properly, it just uses
// regular skia primitives.
-TEST(PlatformCanvas, SkLayer) {
+TEST(PlatformCanvasWin, SkLayer) {
// Create the canvas initialized to opaque white.
- PlatformCanvas canvas(16, 16, true);
+ PlatformCanvasWin canvas(16, 16, true);
canvas.drawColor(SK_ColorWHITE);
// Make a layer and fill it completely to make sure that the bounds are
@@ -163,9 +163,9 @@ TEST(PlatformCanvas, SkLayer) {
}
// Test the GDI clipping.
-TEST(PlatformCanvas, GDIClipRegion) {
+TEST(PlatformCanvasWin, GDIClipRegion) {
// Initialize a white canvas
- PlatformCanvas canvas(16, 16, true);
+ PlatformCanvasWin canvas(16, 16, true);
canvas.drawColor(SK_ColorWHITE);
EXPECT_TRUE(VerifyCanvasColor(canvas, SK_ColorWHITE));
@@ -189,9 +189,9 @@ TEST(PlatformCanvas, GDIClipRegion) {
}
// Test the layers get filled properly by GDI.
-TEST(PlatformCanvas, GDILayer) {
+TEST(PlatformCanvasWin, GDILayer) {
// Create the canvas initialized to opaque white.
- PlatformCanvas canvas(16, 16, true);
+ PlatformCanvasWin canvas(16, 16, true);
// Make a layer and fill it completely to make sure that the bounds are
// correct.
@@ -234,9 +234,9 @@ TEST(PlatformCanvas, GDILayer) {
}
// Test that translation + make layer works properly.
-TEST(PlatformCanvas, GDITranslateLayer) {
+TEST(PlatformCanvasWin, GDITranslateLayer) {
// Create the canvas initialized to opaque white.
- PlatformCanvas canvas(16, 16, true);
+ PlatformCanvasWin canvas(16, 16, true);
// Make a layer and fill it completely to make sure that the bounds are
// correct.
diff --git a/base/gfx/platform_canvas.cc b/base/gfx/platform_canvas_win.cc
index 55a2583..727747c 100644
--- a/base/gfx/platform_canvas.cc
+++ b/base/gfx/platform_canvas_win.cc
@@ -27,9 +27,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
-#include "base/gfx/bitmap_platform_device.h"
+#include "base/gfx/bitmap_platform_device_win.h"
#include "base/logging.h"
#ifdef ARCH_CPU_64_BITS
@@ -39,15 +39,15 @@
namespace gfx {
-PlatformCanvas::PlatformCanvas() : SkCanvas() {
+PlatformCanvasWin::PlatformCanvasWin() : SkCanvas() {
}
-PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque)
+PlatformCanvasWin::PlatformCanvasWin(int width, int height, bool is_opaque)
: SkCanvas() {
initialize(width, height, is_opaque, NULL);
}
-PlatformCanvas::PlatformCanvas(int width,
+PlatformCanvasWin::PlatformCanvasWin(int width,
int height,
bool is_opaque,
HANDLE shared_section)
@@ -55,10 +55,10 @@ PlatformCanvas::PlatformCanvas(int width,
initialize(width, height, is_opaque, shared_section);
}
-PlatformCanvas::~PlatformCanvas() {
+PlatformCanvasWin::~PlatformCanvasWin() {
}
-void PlatformCanvas::initialize(int width,
+void PlatformCanvasWin::initialize(int width,
int height,
bool is_opaque,
HANDLE shared_section) {
@@ -68,22 +68,22 @@ void PlatformCanvas::initialize(int width,
device->unref(); // was created with refcount 1, and setDevice also refs
}
-HDC PlatformCanvas::beginPlatformPaint() {
+HDC PlatformCanvasWin::beginPlatformPaint() {
return getTopPlatformDevice().getBitmapDC();
}
-void PlatformCanvas::endPlatformPaint() {
+void PlatformCanvasWin::endPlatformPaint() {
// we don't clear the DC here since it will be likely to be used again
// flushing will be done in onAccessBitmap
}
-PlatformDevice& PlatformCanvas::getTopPlatformDevice() const {
+PlatformDeviceWin& PlatformCanvasWin::getTopPlatformDevice() const {
// All of our devices should be our special PlatformDevice.
- SkCanvas::LayerIter iter(const_cast<PlatformCanvas*>(this), false);
- return *static_cast<PlatformDevice*>(iter.device());
+ SkCanvas::LayerIter iter(const_cast<PlatformCanvasWin*>(this), false);
+ return *static_cast<PlatformDeviceWin*>(iter.device());
}
-SkDevice* PlatformCanvas::createDevice(SkBitmap::Config config,
+SkDevice* PlatformCanvasWin::createDevice(SkBitmap::Config config,
int width,
int height,
bool is_opaque, bool isForLayer) {
@@ -91,20 +91,20 @@ SkDevice* PlatformCanvas::createDevice(SkBitmap::Config config,
return createPlatformDevice(width, height, is_opaque, NULL);
}
-SkDevice* PlatformCanvas::createPlatformDevice(int width,
+SkDevice* PlatformCanvasWin::createPlatformDevice(int width,
int height,
bool is_opaque,
HANDLE shared_section) {
HDC screen_dc = GetDC(NULL);
- SkDevice* device = BitmapPlatformDevice::create(screen_dc, width, height,
+ SkDevice* device = BitmapPlatformDeviceWin::create(screen_dc, width, height,
is_opaque, shared_section);
ReleaseDC(NULL, screen_dc);
return device;
}
-SkDevice* PlatformCanvas::setBitmapDevice(const SkBitmap&) {
+SkDevice* PlatformCanvasWin::setBitmapDevice(const SkBitmap&) {
NOTREACHED();
return NULL;
}
-} // namespace gfx
+} // namespace gfx \ No newline at end of file
diff --git a/base/gfx/platform_canvas.h b/base/gfx/platform_canvas_win.h
index c024a2f..ee87460 100644
--- a/base/gfx/platform_canvas.h
+++ b/base/gfx/platform_canvas_win.h
@@ -27,10 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef BASE_GFX_PLATFORM_CANVAS_H__
-#define BASE_GFX_PLATFORM_CANVAS_H__
+#ifndef BASE_GFX_PLATFORM_CANVAS_WIN_H__
+#define BASE_GFX_PLATFORM_CANVAS_WIN_H__
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "base/basictypes.h"
#include "SkCanvas.h"
@@ -40,17 +40,17 @@ namespace gfx {
// This class is a specialization of the regular SkCanvas that is designed to
// work with a gfx::PlatformDevice to manage platform-specific drawing. It
// allows using both Skia operations and platform-specific operations.
-class PlatformCanvas : public SkCanvas {
+class PlatformCanvasWin : public SkCanvas {
public:
// Set is_opaque if you are going to erase the bitmap and not use
// tranparency: this will enable some optimizations. The shared_section
// parameter is passed to gfx::PlatformDevice::create. See it for details.
//
// If you use the version with no arguments, you MUST call initialize()
- PlatformCanvas();
- PlatformCanvas(int width, int height, bool is_opaque);
- PlatformCanvas(int width, int height, bool is_opaque, HANDLE shared_section);
- virtual ~PlatformCanvas();
+ PlatformCanvasWin();
+ PlatformCanvasWin(int width, int height, bool is_opaque);
+ PlatformCanvasWin(int width, int height, bool is_opaque, HANDLE shared_section);
+ virtual ~PlatformCanvasWin();
// For two-part init, call if you use the no-argument constructor above
void initialize(int width, int height, bool is_opaque, HANDLE shared_section);
@@ -75,7 +75,7 @@ class PlatformCanvas : public SkCanvas {
//
// Danger: the resulting device should not be saved. It will be invalidated
// by the next call to save() or restore().
- PlatformDevice& getTopPlatformDevice() const;
+ PlatformDeviceWin& getTopPlatformDevice() const;
protected:
// Creates a device store for use by the canvas. We override this so that
@@ -85,7 +85,7 @@ class PlatformCanvas : public SkCanvas {
bool is_opaque, bool isForLayer);
// Creates a device store for use by the canvas. By default, it creates a
- // BitmapPlatformDevice object. Can be overridden to change the object type.
+ // BitmapPlatformDeviceWin object. Can be overridden to change the object type.
virtual SkDevice* createPlatformDevice(int width, int height, bool is_opaque,
HANDLE shared_section);
@@ -93,7 +93,7 @@ class PlatformCanvas : public SkCanvas {
// Unimplemented.
virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap);
- DISALLOW_EVIL_CONSTRUCTORS(PlatformCanvas);
+ DISALLOW_EVIL_CONSTRUCTORS(PlatformCanvasWin);
};
// A class designed to help with WM_PAINT operations on Windows. It will
@@ -108,7 +108,7 @@ class PlatformCanvas : public SkCanvas {
//
// Therefore, all you need to do is:
// case WM_PAINT: {
-// gfx::PlatformCanvasPaint canvas(hwnd);
+// gfx::PlatformCanvasWinPaint canvas(hwnd);
// if (!canvas.isEmpty()) {
// ... paint to the canvas ...
// }
@@ -202,8 +202,8 @@ class CanvasPaintT : public T {
DISALLOW_EVIL_CONSTRUCTORS(CanvasPaintT);
};
-typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint;
+typedef CanvasPaintT<PlatformCanvasWin> PlatformCanvasWinPaint;
} // namespace gfx
-#endif // BASE_GFX_PLATFORM_CANVAS_H__
+#endif // BASE_GFX_PLATFORM_CANVAS_WIN_H__
diff --git a/base/gfx/platform_device.cc b/base/gfx/platform_device_win.cc
index e23ccf3..92d8268 100644
--- a/base/gfx/platform_device.cc
+++ b/base/gfx/platform_device_win.cc
@@ -27,7 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "base/logging.h"
#include "base/gfx/skia_utils.h"
@@ -38,12 +38,12 @@
namespace gfx {
-PlatformDevice::PlatformDevice(const SkBitmap& bitmap)
+PlatformDeviceWin::PlatformDeviceWin(const SkBitmap& bitmap)
: SkDevice(bitmap) {
}
// static
-void PlatformDevice::InitializeDC(HDC context) {
+void PlatformDeviceWin::InitializeDC(HDC context) {
// Enables world transformation.
// If the GM_ADVANCED graphics mode is set, GDI always draws arcs in the
// counterclockwise direction in logical space. This is equivalent to the
@@ -83,7 +83,7 @@ void PlatformDevice::InitializeDC(HDC context) {
}
// static
-void PlatformDevice::LoadPathToDC(HDC context, const SkPath& path) {
+void PlatformDeviceWin::LoadPathToDC(HDC context, const SkPath& path) {
switch (path.getFillType()) {
case SkPath::kWinding_FillType: {
int res = SetPolyFillMode(context, WINDING);
@@ -144,7 +144,7 @@ void PlatformDevice::LoadPathToDC(HDC context, const SkPath& path) {
}
// static
-void PlatformDevice::LoadTransformToDC(HDC dc, const SkMatrix& matrix) {
+void PlatformDeviceWin::LoadTransformToDC(HDC dc, const SkMatrix& matrix) {
XFORM xf;
xf.eM11 = matrix[SkMatrix::kMScaleX];
xf.eM21 = matrix[SkMatrix::kMSkewX];
@@ -156,7 +156,7 @@ void PlatformDevice::LoadTransformToDC(HDC dc, const SkMatrix& matrix) {
}
// static
-bool PlatformDevice::SkPathToCubicPaths(CubicPaths* paths,
+bool PlatformDeviceWin::SkPathToCubicPaths(CubicPaths* paths,
const SkPath& skpath) {
paths->clear();
CubicPath* current_path = NULL;
@@ -219,7 +219,7 @@ bool PlatformDevice::SkPathToCubicPaths(CubicPaths* paths,
}
// static
-void PlatformDevice::LoadClippingRegionToDC(HDC context,
+void PlatformDeviceWin::LoadClippingRegionToDC(HDC context,
const SkRegion& region,
const SkMatrix& transformation) {
HRGN hrgn;
diff --git a/base/gfx/platform_device.h b/base/gfx/platform_device_win.h
index c3dc998..d61afcd 100644
--- a/base/gfx/platform_device.h
+++ b/base/gfx/platform_device_win.h
@@ -27,8 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef BASE_GFX_PLATFORM_DEVICE_H__
-#define BASE_GFX_PLATFORM_DEVICE_H__
+#ifndef BASE_GFX_PLATFORM_DEVICE_WIN_H__
+#define BASE_GFX_PLATFORM_DEVICE_WIN_H__
#include <vector>
@@ -45,7 +45,7 @@ namespace gfx {
// to. It also provides functionality to play well with GDI drawing functions.
// This class is abstract and must be subclassed. It provides the basic
// interface to implement it either with or without a bitmap backend.
-class PlatformDevice : public SkDevice {
+class PlatformDeviceWin : public SkDevice {
public:
// The DC that corresponds to the bitmap, used for GDI operations drawing
// into the bitmap. This is possibly heavyweight, so it should be existant
@@ -105,7 +105,7 @@ class PlatformDevice : public SkDevice {
typedef std::vector<CubicPath> CubicPaths;
// Forwards |bitmap| to SkDevice's constructor.
- PlatformDevice(const SkBitmap& bitmap);
+ PlatformDeviceWin(const SkBitmap& bitmap);
// Loads the specified Skia transform into the device context, excluding
// perspective (which GDI doesn't support).
@@ -117,4 +117,4 @@ class PlatformDevice : public SkDevice {
} // namespace gfx
-#endif // BASE_GFX_PLATFORM_DEVICE_H__
+#endif // BASE_GFX_PLATFORM_DEVICE_WIN_H__
diff --git a/base/gfx/vector_canvas.cc b/base/gfx/vector_canvas.cc
index 6f02f11..22cb2c0 100644
--- a/base/gfx/vector_canvas.cc
+++ b/base/gfx/vector_canvas.cc
@@ -52,7 +52,7 @@ void VectorCanvas::initialize(HDC context, int width, int height) {
SkBounder* VectorCanvas::setBounder(SkBounder* bounder) {
if (!IsTopDeviceVectorial())
- return PlatformCanvas::setBounder(bounder);
+ return PlatformCanvasWin::setBounder(bounder);
// This function isn't used in the code. Verify this assumption.
NOTREACHED();
@@ -79,12 +79,12 @@ SkDevice* VectorCanvas::createPlatformDevice(int width,
// TODO(maruel): http://b/1184002 1184002 When restoring a semi-transparent
// layer, i.e. merging it, we need to rasterize it because GDI doesn't
// support transparency except for AlphaBlend(). Right now, a
- // BitmapPlatformDevice is created when VectorCanvas think a saveLayers()
+ // BitmapPlatformDeviceWin is created when VectorCanvas think a saveLayers()
// call is being done. The way to save a layer would be to create an
// EMF-based VectorDevice and have this device registers the drawing. When
// playing back the device into a bitmap, do it at the printer's dpi instead
// of the layout's dpi (which is much lower).
- return PlatformCanvas::createPlatformDevice(width, height, is_opaque,
+ return PlatformCanvasWin::createPlatformDevice(width, height, is_opaque,
shared_section);
}
@@ -97,7 +97,7 @@ SkDevice* VectorCanvas::createPlatformDevice(int width,
// SkScalarRound(value * 10). Safari is already doing the same for text
// rendering.
DCHECK(shared_section);
- PlatformDevice* device = VectorDevice::create(
+ PlatformDeviceWin* device = VectorDevice::create(
reinterpret_cast<HDC>(shared_section), width, height);
return device;
}
diff --git a/base/gfx/vector_canvas.h b/base/gfx/vector_canvas.h
index d6a5703..137e59a 100644
--- a/base/gfx/vector_canvas.h
+++ b/base/gfx/vector_canvas.h
@@ -30,7 +30,7 @@
#ifndef BASE_GFX_VECTOR_CANVAS_H__
#define BASE_GFX_VECTOR_CANVAS_H__
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/gfx/vector_device.h"
namespace gfx {
@@ -39,7 +39,7 @@ namespace gfx {
// to work with a VectorDevice to manage platform-specific drawing. It allows
// using both Skia operations and platform-specific operations. It *doesn't*
// support reading back from the bitmap backstore since it is not used.
-class VectorCanvas : public PlatformCanvas {
+class VectorCanvas : public PlatformCanvasWin {
public:
VectorCanvas();
VectorCanvas(HDC dc, int width, int height);
diff --git a/base/gfx/vector_canvas_unittest.cc b/base/gfx/vector_canvas_unittest.cc
index 57ff34d..14ad6e1 100644
--- a/base/gfx/vector_canvas_unittest.cc
+++ b/base/gfx/vector_canvas_unittest.cc
@@ -163,7 +163,7 @@ class Image {
}
// Loads the image from a canvas.
- Image(const gfx::PlatformCanvas& canvas) : ignore_alpha_(true) {
+ Image(const gfx::PlatformCanvasWin& canvas) : ignore_alpha_(true) {
// Use a different way to access the bitmap. The normal way would be to
// query the SkBitmap.
HDC context = canvas.getTopPlatformDevice().getBitmapDC();
@@ -302,7 +302,7 @@ class ImageTest : public DataUnitTest {
// kGenerating value. Returns 0 on success or any positive value between ]0,
// 100] on failure. The return value is the percentage of difference between
// the image in the file and the image in the canvas.
- double ProcessCanvas(const gfx::PlatformCanvas& canvas,
+ double ProcessCanvas(const gfx::PlatformCanvasWin& canvas,
std::wstring filename) const {
filename += L".png";
switch (action_) {
@@ -321,7 +321,7 @@ class ImageTest : public DataUnitTest {
// Compares the bitmap currently loaded in the context with the file. Returns
// the percentage of pixel difference between both images, between 0 and 100.
- double CompareImage(const gfx::PlatformCanvas& canvas,
+ double CompareImage(const gfx::PlatformCanvasWin& canvas,
const std::wstring& filename) const {
Image image1(canvas);
Image image2(test_file(filename));
@@ -330,7 +330,7 @@ class ImageTest : public DataUnitTest {
}
// Saves the bitmap currently loaded in the context into the file.
- void SaveImage(const gfx::PlatformCanvas& canvas,
+ void SaveImage(const gfx::PlatformCanvasWin& canvas,
const std::wstring& filename) const {
Image(canvas).SaveToFile(test_file(filename));
}
@@ -420,7 +420,7 @@ class VectorCanvasTest : public ImageTest {
context_ = new Context();
bitmap_ = new Bitmap(*context_, size_, size_);
vcanvas_ = new gfx::VectorCanvas(context_->context(), size_, size_);
- pcanvas_ = new gfx::PlatformCanvas(size_, size_, false);
+ pcanvas_ = new gfx::PlatformCanvasWin(size_, size_, false);
// Clear white.
vcanvas_->drawARGB(255, 255, 255, 255, SkPorterDuff::kSrc_Mode);
@@ -464,7 +464,7 @@ class VectorCanvasTest : public ImageTest {
gfx::VectorCanvas* vcanvas_;
// Pixel based canvas.
- gfx::PlatformCanvas* pcanvas_;
+ gfx::PlatformCanvasWin* pcanvas_;
// When true (default), vcanvas_ and pcanvas_ contents are compared and
// verified to be identical.
@@ -485,7 +485,7 @@ TEST_F(VectorCanvasTest, Uninitialized) {
context_ = new Context();
bitmap_ = new Bitmap(*context_, size_, size_);
vcanvas_ = new gfx::VectorCanvas(context_->context(), size_, size_);
- pcanvas_ = new gfx::PlatformCanvas(size_, size_, false);
+ pcanvas_ = new gfx::PlatformCanvasWin(size_, size_, false);
// VectorCanvas default initialization is black.
// PlatformCanvas default initialization is almost white 0x01FFFEFD (invalid
diff --git a/base/gfx/vector_device.cc b/base/gfx/vector_device.cc
index c7e20f6..c645ca7 100644
--- a/base/gfx/vector_device.cc
+++ b/base/gfx/vector_device.cc
@@ -72,7 +72,7 @@ VectorDevice* VectorDevice::create(HDC dc, int width, int height) {
}
VectorDevice::VectorDevice(HDC dc, const SkBitmap& bitmap)
- : PlatformDevice(bitmap),
+ : PlatformDeviceWin(bitmap),
hdc_(dc),
previous_brush_(NULL),
previous_pen_(NULL),
@@ -191,7 +191,7 @@ void VectorDevice::drawPath(const SkDraw& draw, const SkPath& path,
return;
}
HDC dc = getBitmapDC();
- PlatformDevice::LoadPathToDC(dc, path);
+ PlatformDeviceWin::LoadPathToDC(dc, path);
switch (paint.getStyle()) {
case SkPaint::kFill_Style: {
BOOL res = StrokeAndFillPath(dc);
diff --git a/base/gfx/vector_device.h b/base/gfx/vector_device.h
index 002ce17..73524de 100644
--- a/base/gfx/vector_device.h
+++ b/base/gfx/vector_device.h
@@ -31,7 +31,7 @@
#define BASE_GFX_VECTOR_DEVICE_H__
#include "base/basictypes.h"
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "SkMatrix.h"
#include "SkRegion.h"
@@ -41,7 +41,7 @@ namespace gfx {
// SkCanvas to draw into. This specific device is not not backed by a surface
// and is thus unreadable. This is because the backend is completely vectorial.
// This device is a simple wrapper over a Windows device context (HDC) handle.
-class VectorDevice : public PlatformDevice {
+class VectorDevice : public PlatformDeviceWin {
public:
// Factory function. The DC is kept as the output context.
static VectorDevice* create(HDC dc, int width, int height);
diff --git a/chrome/browser/printing/printed_document.cc b/chrome/browser/printing/printed_document.cc
index fb4d13a..092a69d 100644
--- a/chrome/browser/printing/printed_document.cc
+++ b/chrome/browser/printing/printed_document.cc
@@ -31,7 +31,7 @@
#include <set>
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "base/message_loop.h"
#include "base/time.h"
#include "chrome/browser/printing/page_number.h"
@@ -126,7 +126,7 @@ void PrintedDocument::RenderPrintedPage(const PrintedPage& page,
// the device context.
int saved_state = SaveDC(context);
DCHECK_NE(saved_state, 0);
- gfx::PlatformDevice::InitializeDC(context);
+ gfx::PlatformDeviceWin::InitializeDC(context);
{
// Save the state (again) to apply the necessary world transformation.
int saved_state = SaveDC(context);
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc
index d2b9ff8..87c2c13 100644
--- a/chrome/browser/printing/printing_layout_uitest.cc
+++ b/chrome/browser/printing/printing_layout_uitest.cc
@@ -29,7 +29,7 @@
#include "base/command_line.h"
#include "base/gfx/bitmap_header.h"
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "base/gfx/png_decoder.h"
#include "base/gfx/png_encoder.h"
#include "base/time.h"
@@ -195,7 +195,7 @@ class Image {
&bits, NULL, 0);
EXPECT_TRUE(bitmap);
EXPECT_TRUE(SelectObject(hdc, bitmap));
- gfx::PlatformDevice::InitializeDC(hdc);
+ gfx::PlatformDeviceWin::InitializeDC(hdc);
EXPECT_TRUE(emf.Playback(hdc, NULL));
row_length_ = size_.width() * sizeof(uint32);
size_t bytes = row_length_ * size_.height();
diff --git a/chrome/browser/printing/win_printing_context.cc b/chrome/browser/printing/win_printing_context.cc
index 81315f3..1e3da12 100644
--- a/chrome/browser/printing/win_printing_context.cc
+++ b/chrome/browser/printing/win_printing_context.cc
@@ -32,7 +32,7 @@
#include <winspool.h>
#include "base/file_util.h"
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/common/gfx/emf.h"
@@ -403,7 +403,7 @@ bool PrintingContext::InitializeSettings(const DEVMODE& dev_mode,
const std::wstring& new_device_name,
const PRINTPAGERANGE* ranges,
int number_ranges) {
- gfx::PlatformDevice::InitializeDC(hdc_);
+ gfx::PlatformDeviceWin::InitializeDC(hdc_);
DCHECK(GetDeviceCaps(hdc_, CLIPCAPS));
DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_STRETCHDIB);
DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_BITMAP64);
diff --git a/chrome/browser/views/theme_helpers.cc b/chrome/browser/views/theme_helpers.cc
index fa2820d..89fb02d 100644
--- a/chrome/browser/views/theme_helpers.cc
+++ b/chrome/browser/views/theme_helpers.cc
@@ -33,7 +33,7 @@
#include <atlapp.h>
#include <atltheme.h>
-#include "base/gfx/bitmap_platform_device.h"
+#include "base/gfx/bitmap_platform_device_win.h"
#include "chrome/common/gfx/chrome_canvas.h"
#include "base/logging.h"
#include "SkGradientShader.h"
@@ -87,8 +87,8 @@ void GetRebarGradientColors(int width, int x1, int x2, SkColor* c1, SkColor* c2)
// Extract the color values from the selected pixels
// The | in the following operations forces the alpha to 0xFF. This is
// needed as windows sets the alpha to 0 when it renders.
- gfx::BitmapPlatformDevice& device =
- static_cast<gfx::BitmapPlatformDevice&>(canvas.getTopPlatformDevice());
+ gfx::BitmapPlatformDeviceWin& device =
+ static_cast<gfx::BitmapPlatformDeviceWin&>(canvas.getTopPlatformDevice());
*c1 = 0xFF000000 | device.getColorAt(x1, 0);
*c2 = 0xFF000000 | device.getColorAt(x2, 0);
}
diff --git a/chrome/common/gfx/chrome_canvas.cc b/chrome/common/gfx/chrome_canvas.cc
index b73a407..9fc776f 100644
--- a/chrome/common/gfx/chrome_canvas.cc
+++ b/chrome/common/gfx/chrome_canvas.cc
@@ -38,10 +38,10 @@
#include "chrome/common/l10n_util.h"
ChromeCanvas::ChromeCanvas(int width, int height, bool is_opaque)
- : gfx::PlatformCanvas(width, height, is_opaque) {
+ : gfx::PlatformCanvasWin(width, height, is_opaque) {
}
-ChromeCanvas::ChromeCanvas() : gfx::PlatformCanvas() {
+ChromeCanvas::ChromeCanvas() : gfx::PlatformCanvasWin() {
}
ChromeCanvas::~ChromeCanvas() {
diff --git a/chrome/common/gfx/chrome_canvas.h b/chrome/common/gfx/chrome_canvas.h
index 4c6d63d..bc29deb 100644
--- a/chrome/common/gfx/chrome_canvas.h
+++ b/chrome/common/gfx/chrome_canvas.h
@@ -33,7 +33,7 @@
#include <windows.h>
#include <string>
#include "base/basictypes.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
class ChromeFont;
namespace gfx {
@@ -56,7 +56,7 @@ class Rect;
// source and destination colors are combined. Unless otherwise specified,
// the variant that does not take a SkPorterDuff::Mode uses a transfer mode
// of kSrcOver_Mode.
-class ChromeCanvas : public gfx::PlatformCanvas {
+class ChromeCanvas : public gfx::PlatformCanvasWin {
public:
// Specifies the alignment for text rendered with the DrawStringInt method.
static const int TEXT_ALIGN_LEFT = 1;
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index 8004cdf..64c96fa 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -32,7 +32,7 @@
#include "base/command_line.h"
#include "base/time.h"
#include "base/gfx/bitmap_header.h"
-#include "base/gfx/platform_device.h"
+#include "base/gfx/platform_device_win.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/gfx/emf.h"
#include "chrome/common/plugin_messages.h"
@@ -257,7 +257,7 @@ void WebPluginDelegateStub::OnPaint(const PluginMsg_Paint_Params& params) {
NOTREACHED();
return;
}
- gfx::PlatformDevice::InitializeDC(hdc);
+ gfx::PlatformDeviceWin::InitializeDC(hdc);
SelectObject(hdc, hbitmap);
SetWorldTransform(hdc, &params.xf);
@@ -274,7 +274,7 @@ void WebPluginDelegateStub::OnPrint(PluginMsg_PrintResponse_Params* params) {
return;
}
HDC hdc = emf.hdc();
- gfx::PlatformDevice::InitializeDC(hdc);
+ gfx::PlatformDeviceWin::InitializeDC(hdc);
delegate_->Print(hdc);
if (!emf.CloseDc()) {
NOTREACHED();
@@ -305,7 +305,7 @@ void WebPluginDelegateStub::OnPaintIntoSharedMemory(
return;
}
HDC hdc = emf.hdc();
- gfx::PlatformDevice::InitializeDC(hdc);
+ gfx::PlatformDeviceWin::InitializeDC(hdc);
if (delegate_->windowless()) {
WindowlessPaint(hdc, params);
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 478efaa..2d93886 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -35,7 +35,7 @@
#include "base/command_line.h"
#include "base/gfx/bitmap_header.h"
-#include "base/gfx/bitmap_platform_device.h"
+#include "base/gfx/bitmap_platform_device_win.h"
#include "base/gfx/image_operations.h"
#include "base/gfx/native_theme.h"
#include "base/gfx/vector_canvas.h"
@@ -456,7 +456,7 @@ void RenderView::PrintPage(const ViewMsg_PrintPage_Params& params,
emf.CreateDc(NULL, NULL);
HDC hdc = emf.hdc();
DCHECK(hdc);
- gfx::PlatformDevice::InitializeDC(hdc);
+ gfx::PlatformDeviceWin::InitializeDC(hdc);
gfx::Rect rect;
frame->GetPageRect(params.page_number, &rect);
@@ -480,7 +480,7 @@ void RenderView::PrintPage(const ViewMsg_PrintPage_Params& params,
// GDI drawing code fails.
// Mix of Skia and GDI based.
- gfx::PlatformCanvas canvas(src_size_x, src_size_y, true);
+ gfx::PlatformCanvasWin canvas(src_size_x, src_size_y, true);
canvas.drawARGB(255, 255, 255, 255, SkPorterDuff::kSrc_Mode);
PlatformContextSkia context(&canvas);
if (!frame->SpoolPage(params.page_number, &context)) {
@@ -692,7 +692,7 @@ void RenderView::CaptureThumbnail(WebFrame* frame,
double begin = time_util::GetHighResolutionTimeNow();
#endif
- gfx::BitmapPlatformDevice device(frame->CaptureImage(true));
+ gfx::BitmapPlatformDeviceWin device(frame->CaptureImage(true));
const SkBitmap& src_bmp = device.accessBitmap(false);
SkRect dest_rect;
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index 90ec7c6..749fd8c 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -35,7 +35,7 @@
#include "base/gfx/size.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/scoped_ptr.h"
#include "webkit/glue/webinputevent.h"
#include "webkit/glue/webwidget.h"
@@ -368,7 +368,7 @@ void RenderWidget::ClearFocus() {
}
void RenderWidget::PaintRect(const gfx::Rect& rect, SharedMemory* paint_buf) {
- gfx::PlatformCanvas canvas(rect.width(), rect.height(), true,
+ gfx::PlatformCanvasWin canvas(rect.width(), rect.height(), true,
paint_buf->handle());
// Bring the canvas into the coordinate system of the paint rect
canvas.translate(static_cast<SkScalar>(-rect.x()),
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h
index 996d0db..d417563b 100644
--- a/webkit/glue/webframe.h
+++ b/webkit/glue/webframe.h
@@ -48,7 +48,7 @@ class WebTextInput;
struct NPObject;
namespace gfx {
-class BitmapPlatformDevice;
+class BitmapPlatformDeviceWin;
class Size;
class Rect;
}
@@ -306,7 +306,7 @@ class WebFrame : public base::RefCounted<WebFrame> {
// just draws the contents at a different place, but it does mean the
// scrollbars in the resulting image will appear to be wrong (they'll be
// painted as if the content was scrolled).
- virtual gfx::BitmapPlatformDevice CaptureImage(bool scroll_to_zero) = 0;
+ virtual gfx::BitmapPlatformDeviceWin CaptureImage(bool scroll_to_zero) = 0;
// This function sets a flag within WebKit to instruct it to render the page
// as View-Source (showing the HTML source for the page).
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 64b79de..c8627d1 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -118,9 +118,9 @@
#pragma warning(pop)
#undef LOG
-#include "base/gfx/bitmap_platform_device.h"
+#include "base/gfx/bitmap_platform_device_win.h"
#include "base/gfx/rect.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/stats_counters.h"
@@ -1358,7 +1358,7 @@ void WebFrameImpl::Layout() {
FromFrame(child)->Layout();
}
-void WebFrameImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
+void WebFrameImpl::Paint(gfx::PlatformCanvasWin* canvas, const gfx::Rect& rect) {
static StatsRate rendering(L"WebFramePaintTime");
StatsScope<StatsRate> rendering_scope(rendering);
@@ -1377,19 +1377,19 @@ void WebFrameImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
}
}
-gfx::BitmapPlatformDevice WebFrameImpl::CaptureImage(bool scroll_to_zero) {
+gfx::BitmapPlatformDeviceWin WebFrameImpl::CaptureImage(bool scroll_to_zero) {
// Must layout before painting.
Layout();
- gfx::PlatformCanvas canvas(frameview()->width(), frameview()->height(), true);
+ gfx::PlatformCanvasWin canvas(frameview()->width(), frameview()->height(), true);
PlatformContextSkia context(&canvas);
GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context));
frameview()->paint(&gc, IntRect(0, 0, frameview()->width(),
frameview()->height()));
- gfx::BitmapPlatformDevice& device =
- static_cast<gfx::BitmapPlatformDevice&>(canvas.getTopPlatformDevice());
+ gfx::BitmapPlatformDeviceWin& device =
+ static_cast<gfx::BitmapPlatformDeviceWin&>(canvas.getTopPlatformDevice());
device.fixupAlphaBeforeCompositing();
return device;
}
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index 2b974b7..c466b16 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -63,8 +63,8 @@ struct WindowFeatures;
}
namespace gfx {
-class PlatformCanvas;
-class BitmapPlatformDevice;
+class PlatformCanvasWin;
+class BitmapPlatformDeviceWin;
}
// Implementation of WebFrame, note that this is a reference counted object.
@@ -108,7 +108,7 @@ class WebFrameImpl : public WebFrame {
virtual WebFrame* GetParent() const;
virtual WebFrame* GetChildFrame(const std::wstring& xpath) const;
virtual WebView* GetView() const;
- virtual gfx::BitmapPlatformDevice CaptureImage(bool scroll_to_zero);
+ virtual gfx::BitmapPlatformDeviceWin CaptureImage(bool scroll_to_zero);
// This method calls createRuntimeObject (in KJS::Bindings::Instance), which
// increments the refcount of the NPObject passed in.
@@ -182,7 +182,7 @@ class WebFrameImpl : public WebFrame {
// WebFrameImpl
void Layout();
- void Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect);
+ void Paint(gfx::PlatformCanvasWin* canvas, const gfx::Rect& rect);
bool IsLoading();
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 69b6cd2..3882c4a 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -655,7 +655,7 @@ void WebViewImpl::Layout() {
}
}
-void WebViewImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
+void WebViewImpl::Paint(gfx::PlatformCanvasWin* canvas, const gfx::Rect& rect) {
if (main_frame_)
main_frame_->Paint(canvas, rect);
}
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index e22c49f..57b18b6 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -83,7 +83,7 @@ class WebViewImpl : public WebView,
virtual void Resize(const gfx::Size& new_size);
virtual gfx::Size GetSize() { return size(); }
virtual void Layout();
- virtual void Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect);
+ virtual void Paint(gfx::PlatformCanvasWin* canvas, const gfx::Rect& rect);
virtual bool HandleInputEvent(const WebInputEvent* input_event);
virtual void MouseCaptureLost();
virtual void SetFocus(bool enable);
diff --git a/webkit/glue/webwidget.h b/webkit/glue/webwidget.h
index 1f5f74c..a22cc9d 100644
--- a/webkit/glue/webwidget.h
+++ b/webkit/glue/webwidget.h
@@ -33,7 +33,7 @@
#include "base/ref_counted.h"
namespace gfx {
-class PlatformCanvas;
+class PlatformCanvasWin;
class Rect;
class Size;
}
@@ -70,7 +70,7 @@ class WebWidget : public base::RefCounted<WebWidget> {
// multiple times once Layout has been called, assuming no other changes are
// made to the WebWidget (e.g., once events are processed, it should be assumed
// that another call to Layout is warranted before painting again).
- virtual void Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) = 0;
+ virtual void Paint(gfx::PlatformCanvasWin* canvas, const gfx::Rect& rect) = 0;
// Called to inform the WebWidget of an input event.
// Returns true if the event has been processed, false otherwise.
diff --git a/webkit/glue/webwidget_impl.cc b/webkit/glue/webwidget_impl.cc
index 70dc0a1..4f5ad51 100644
--- a/webkit/glue/webwidget_impl.cc
+++ b/webkit/glue/webwidget_impl.cc
@@ -41,7 +41,7 @@
#pragma warning(pop)
#undef LOG
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/gfx/rect.h"
#include "base/logging.h"
#include "webkit/glue/event_conversion.h"
@@ -144,7 +144,7 @@ void WebWidgetImpl::Resize(const gfx::Size& new_size) {
void WebWidgetImpl::Layout() {
}
-void WebWidgetImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
+void WebWidgetImpl::Paint(gfx::PlatformCanvasWin* canvas, const gfx::Rect& rect) {
if (!widget_)
return;
diff --git a/webkit/glue/webwidget_impl.h b/webkit/glue/webwidget_impl.h
index e885c1d..79d7323 100644
--- a/webkit/glue/webwidget_impl.h
+++ b/webkit/glue/webwidget_impl.h
@@ -61,7 +61,7 @@ class WebWidgetImpl : public WebWidget, public WebCore::WidgetClientWin {
virtual void Resize(const gfx::Size& new_size);
virtual gfx::Size GetSize() { return size(); }
virtual void Layout();
- virtual void Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect);
+ virtual void Paint(gfx::PlatformCanvasWin* canvas, const gfx::Rect& rect);
virtual bool HandleInputEvent(const WebInputEvent* input_event);
virtual void MouseCaptureLost();
virtual void SetFocus(bool enable);
diff --git a/webkit/pending/CanvasRenderingContext2D.cpp b/webkit/pending/CanvasRenderingContext2D.cpp
index a68abe8..1d28a2f 100644
--- a/webkit/pending/CanvasRenderingContext2D.cpp
+++ b/webkit/pending/CanvasRenderingContext2D.cpp
@@ -58,7 +58,7 @@
#include <cairo.h>
#elif defined(ANDROID_CANVAS_IMPL)
#include "PlatformContextSkia.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#endif
namespace WebCore {
diff --git a/webkit/port/platform/PlatformScrollBar.h b/webkit/port/platform/PlatformScrollBar.h
index 0a3426b..ee619e1 100644
--- a/webkit/port/platform/PlatformScrollBar.h
+++ b/webkit/port/platform/PlatformScrollBar.h
@@ -33,7 +33,7 @@
#include "Timer.h"
namespace gfx {
-class PlatformCanvas;
+class PlatformCanvasWin;
}
namespace WebCore {
diff --git a/webkit/port/platform/PlatformScrollBarWin.cpp b/webkit/port/platform/PlatformScrollBarWin.cpp
index 9845c05..c921e97 100644
--- a/webkit/port/platform/PlatformScrollBarWin.cpp
+++ b/webkit/port/platform/PlatformScrollBarWin.cpp
@@ -45,7 +45,7 @@
#undef LOG
#include "base/gfx/native_theme.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/win_util.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webkit_glue.h"
@@ -189,7 +189,7 @@ void PlatformScrollbar::DrawTickmarks(GraphicsContext* context) const
// will not be serialized, i.e. composition is done in the renderer and
// never in the browser.
// Prepare the bitmap for drawing the tickmarks on the scroll bar.
- gfx::PlatformCanvas* canvas = PlatformContextToPlatformContextSkia(
+ gfx::PlatformCanvasWin* canvas = PlatformContextToPlatformContextSkia(
context->platformContext())->canvas();
// Load the image for the tickmark.
@@ -242,7 +242,7 @@ void PlatformScrollbar::paint(GraphicsContext* gc, const IntRect& damageRect)
const PlatformContextSkia* const skia =
PlatformContextToPlatformContextSkia(gc->platformContext());
const gfx::NativeTheme* const nativeTheme = skia->nativeTheme();
- gfx::PlatformCanvas* const canvas = skia->canvas();
+ gfx::PlatformCanvasWin* const canvas = skia->canvas();
// Draw the up/left arrow of the scroll bar.
nativeTheme->PaintScrollbarArrow(hdc, getThemeArrowState(Arrow1),
diff --git a/webkit/port/platform/ScrollViewWin.cpp b/webkit/port/platform/ScrollViewWin.cpp
index 5ac56ed..6761073 100644
--- a/webkit/port/platform/ScrollViewWin.cpp
+++ b/webkit/port/platform/ScrollViewWin.cpp
@@ -49,7 +49,7 @@
#include <wtf/HashSet.h>
#undef LOG
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webview_impl.h"
@@ -314,7 +314,7 @@ void ScrollView::ScrollViewPrivate::highlightMatches(
// will not be serialized, i.e. composition is done in the renderer and
// never in the browser.
// Prepare for drawing the arrows along the scroll bar.
- gfx::PlatformCanvas* canvas = PlatformContextToPlatformContextSkia(
+ gfx::PlatformCanvasWin* canvas = PlatformContextToPlatformContextSkia(
context->platformContext())->canvas();
int horz_start = 0;
diff --git a/webkit/port/platform/graphics/FontWin.cpp b/webkit/port/platform/graphics/FontWin.cpp
index 512a3cf..0287d3f 100644
--- a/webkit/port/platform/graphics/FontWin.cpp
+++ b/webkit/port/platform/graphics/FontWin.cpp
@@ -32,7 +32,7 @@
#include "SimpleFontData.h"
#include "UniscribeStateTextRun.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "graphics/SkiaUtils.h"
#include "webkit/glue/webkit_glue.h"
diff --git a/webkit/port/platform/graphics/GraphicsContextSkia.cpp b/webkit/port/platform/graphics/GraphicsContextSkia.cpp
index c10cf60..e169a1d 100644
--- a/webkit/port/platform/graphics/GraphicsContextSkia.cpp
+++ b/webkit/port/platform/graphics/GraphicsContextSkia.cpp
@@ -34,7 +34,7 @@
# include "SkGradientShader.h"
#endif
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
using namespace std;
@@ -704,7 +704,7 @@ void GraphicsContext::freePlatformPattern(PlatformPattern* shader)
GraphicsContext* GraphicsContext::createOffscreenContext(int width, int height)
{
- gfx::PlatformCanvas* canvas = new gfx::PlatformCanvas(width, height, false);
+ gfx::PlatformCanvasWin* canvas = new gfx::PlatformCanvasWin(width, height, false);
PlatformContextSkia* pgc = new PlatformContextSkia(canvas);
canvas->drawARGB(0, 0, 0, 0, SkPorterDuff::kClear_Mode);
diff --git a/webkit/port/platform/graphics/ImageSkia.cpp b/webkit/port/platform/graphics/ImageSkia.cpp
index d5930e2..359f6c0 100644
--- a/webkit/port/platform/graphics/ImageSkia.cpp
+++ b/webkit/port/platform/graphics/ImageSkia.cpp
@@ -47,7 +47,7 @@
#include "base/gfx/bitmap_header.h"
#include "base/gfx/image_operations.h"
#include "base/gfx/native_theme.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkit_resources.h"
@@ -129,8 +129,8 @@ void GetTextAreaResizeCorner(Image* image)
const int height = PlatformScrollbar::horizontalScrollbarHeight();
// Setup a memory buffer.
- gfx::PlatformCanvas canvas(width, height, false);
- gfx::PlatformDevice& device = canvas.getTopPlatformDevice();
+ gfx::PlatformCanvasWin canvas(width, height, false);
+ gfx::PlatformDeviceWin& device = canvas.getTopPlatformDevice();
device.prepareForGDI(0, 0, width, height);
HDC hdc = device.getBitmapDC();
RECT widgetRect = { 0, 0, width, height };
diff --git a/webkit/port/platform/graphics/PlatformContextSkia.cpp b/webkit/port/platform/graphics/PlatformContextSkia.cpp
index 4019578..c2586b3 100644
--- a/webkit/port/platform/graphics/PlatformContextSkia.cpp
+++ b/webkit/port/platform/graphics/PlatformContextSkia.cpp
@@ -31,7 +31,7 @@
#include "PlatformContextSkia.h"
-PlatformContextSkia::PlatformContextSkia(gfx::PlatformCanvas* canvas)
+PlatformContextSkia::PlatformContextSkia(gfx::PlatformCanvasWin* canvas)
: SkGraphicsContext(canvas)
{
}
diff --git a/webkit/port/platform/graphics/PlatformContextSkia.h b/webkit/port/platform/graphics/PlatformContextSkia.h
index 83e4e2c..6afde66 100644
--- a/webkit/port/platform/graphics/PlatformContextSkia.h
+++ b/webkit/port/platform/graphics/PlatformContextSkia.h
@@ -47,7 +47,7 @@ class PlatformContextSkia : public SkGraphicsContext {
friend class WebCore::GraphicsContextPlatformPrivate;
public:
// For printing, there shouldn't be any canvas. canvas can be NULL.
- PlatformContextSkia(gfx::PlatformCanvas* canvas);
+ PlatformContextSkia(gfx::PlatformCanvasWin* canvas);
~PlatformContextSkia();
protected:
diff --git a/webkit/port/platform/graphics/SkGraphicsContext.cpp b/webkit/port/platform/graphics/SkGraphicsContext.cpp
index 74cd8ed..0843840 100644
--- a/webkit/port/platform/graphics/SkGraphicsContext.cpp
+++ b/webkit/port/platform/graphics/SkGraphicsContext.cpp
@@ -33,7 +33,7 @@
#include "base/gfx/image_operations.h"
#include "base/gfx/native_theme.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/gfx/skia_utils.h"
#include "GraphicsContextPrivate.h"
#include "NativeImageSkia.h"
@@ -146,7 +146,7 @@ void DrawResampledBitmap(SkCanvas& canvas,
} // namespace
-SkGraphicsContext::SkGraphicsContext(gfx::PlatformCanvas* canvas)
+SkGraphicsContext::SkGraphicsContext(gfx::PlatformCanvasWin* canvas)
: canvas_(canvas),
paint_context_(NULL),
own_canvas_(false) {
@@ -425,7 +425,7 @@ const SkBitmap* SkGraphicsContext::bitmap() const
return &canvas_->getDevice()->accessBitmap(false);
}
-gfx::PlatformCanvas* SkGraphicsContext::canvas() const
+gfx::PlatformCanvasWin* SkGraphicsContext::canvas() const
{
return canvas_;
}
diff --git a/webkit/port/platform/graphics/SkGraphicsContext.h b/webkit/port/platform/graphics/SkGraphicsContext.h
index c97738a..191dbf6 100644
--- a/webkit/port/platform/graphics/SkGraphicsContext.h
+++ b/webkit/port/platform/graphics/SkGraphicsContext.h
@@ -47,7 +47,7 @@ class UniscribeStateTextRun;
namespace gfx {
class NativeTheme;
-class PlatformCanvas;
+class PlatformCanvasWin;
}
@@ -67,7 +67,7 @@ class SkGraphicsContext {
RESAMPLE_AWESOME,
};
- SkGraphicsContext(gfx::PlatformCanvas* canvas);
+ SkGraphicsContext(gfx::PlatformCanvasWin* canvas);
~SkGraphicsContext();
// Gets the default theme.
@@ -130,7 +130,7 @@ class SkGraphicsContext {
// Warning: This function is deprecated so the users are reminded that they
// should use this layer of indirection instead of using the canvas directly.
// This is to help with the eventual serialization.
- gfx::PlatformCanvas* canvas() const;
+ gfx::PlatformCanvasWin* canvas() const;
// Returns if the context is a printing context instead of a display context.
// Bitmap shouldn't be resampled when printing to keep the best possible
@@ -147,7 +147,7 @@ class SkGraphicsContext {
SkPaintContext* paint_context_;
// Can be NULL when serializing.
- gfx::PlatformCanvas* canvas_;
+ gfx::PlatformCanvasWin* canvas_;
// Signal that we own the canvas and must delete it on destruction.
bool own_canvas_;
diff --git a/webkit/port/platform/graphics/SkPaintContext.cpp b/webkit/port/platform/graphics/SkPaintContext.cpp
index 8302153..71ea81f 100644
--- a/webkit/port/platform/graphics/SkPaintContext.cpp
+++ b/webkit/port/platform/graphics/SkPaintContext.cpp
@@ -33,7 +33,7 @@
#include "SkShader.h"
#include "SkDashPathEffect.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
namespace {
@@ -127,7 +127,7 @@ struct SkPaintContext::State {
};
// Context will be NULL if painting should be disabled.
-SkPaintContext::SkPaintContext(gfx::PlatformCanvas* context)
+SkPaintContext::SkPaintContext(gfx::PlatformCanvasWin* context)
: canvas_(context),
state_stack_(sizeof(State)) {
State* state = reinterpret_cast<State*>(state_stack_.push_back());
diff --git a/webkit/port/platform/graphics/SkPaintContext.h b/webkit/port/platform/graphics/SkPaintContext.h
index c56d30f..dd0f215 100644
--- a/webkit/port/platform/graphics/SkPaintContext.h
+++ b/webkit/port/platform/graphics/SkPaintContext.h
@@ -37,7 +37,7 @@
#include "SkPath.h"
namespace gfx {
-class PlatformCanvas;
+class PlatformCanvasWin;
}
// This class is the interface to communicate to Skia. It is meant to be as
@@ -60,7 +60,7 @@ class SkPaintContext {
};
// Context will be NULL if painting should be disabled.
- SkPaintContext(gfx::PlatformCanvas* context);
+ SkPaintContext(gfx::PlatformCanvasWin* context);
~SkPaintContext();
void save();
@@ -103,7 +103,7 @@ class SkPaintContext {
SkColor fillColor() const;
protected:
- gfx::PlatformCanvas* canvas() {
+ gfx::PlatformCanvasWin* canvas() {
return canvas_;
}
@@ -112,7 +112,7 @@ class SkPaintContext {
struct State;
// NULL indicates painting is disabled. Never delete this object.
- gfx::PlatformCanvas* canvas_;
+ gfx::PlatformCanvasWin* canvas_;
// States stack. Enables local drawing state change with save()/restore()
// calls.
diff --git a/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp b/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp
index 13c1f44..d952f74 100644
--- a/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp
+++ b/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp
@@ -35,7 +35,7 @@
#include "GraphicsContext.h"
#include "RenderPath.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "SkiaUtils.h"
#include "SkDashPathEffect.h"
diff --git a/webkit/port/platform/graphics/svg/SkiaSupport.cpp b/webkit/port/platform/graphics/svg/SkiaSupport.cpp
index 2a66850..8e45abe 100644
--- a/webkit/port/platform/graphics/svg/SkiaSupport.cpp
+++ b/webkit/port/platform/graphics/svg/SkiaSupport.cpp
@@ -41,7 +41,7 @@
#include "SVGPaintServer.h"
#include "SVGRenderStyle.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "SkiaUtils.h"
#include "SkDashPathEffect.h"
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index cbe8561..a256646 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -39,7 +39,7 @@
#include "base/command_line.h"
#include "base/debug_on_start.h"
#include "base/file_util.h"
-#include "base/gfx/bitmap_platform_device.h"
+#include "base/gfx/bitmap_platform_device_win.h"
#include "base/gfx/png_encoder.h"
#include "base/gfx/size.h"
#include "base/icu_util.h"
@@ -542,7 +542,7 @@ void TestShell::ResizeSubViews() {
/* static */ std::string TestShell::DumpImage(
WebFrame* web_frame,
const std::wstring& file_name) {
- gfx::BitmapPlatformDevice device(web_frame->CaptureImage(true));
+ gfx::BitmapPlatformDeviceWin device(web_frame->CaptureImage(true));
const SkBitmap& src_bmp = device.accessBitmap(false);
// Encode image.
diff --git a/webkit/tools/test_shell/webview_host.cc b/webkit/tools/test_shell/webview_host.cc
index 61f66f0..ea59c14 100644
--- a/webkit/tools/test_shell/webview_host.cc
+++ b/webkit/tools/test_shell/webview_host.cc
@@ -29,7 +29,7 @@
#include "webkit/tools/test_shell/webview_host.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/gfx/rect.h"
#include "base/gfx/size.h"
#include "base/win_util.h"
diff --git a/webkit/tools/test_shell/webwidget_host.cc b/webkit/tools/test_shell/webwidget_host.cc
index b037ca9..7b90c60 100644
--- a/webkit/tools/test_shell/webwidget_host.cc
+++ b/webkit/tools/test_shell/webwidget_host.cc
@@ -29,7 +29,7 @@
#include "webkit/tools/test_shell/webwidget_host.h"
-#include "base/gfx/platform_canvas.h"
+#include "base/gfx/platform_canvas_win.h"
#include "base/gfx/rect.h"
#include "base/gfx/size.h"
#include "base/win_util.h"
@@ -227,7 +227,7 @@ void WebWidgetHost::Paint() {
if (!canvas_.get()) {
ResetScrollRect();
paint_rect_ = client_rect;
- canvas_.reset(new gfx::PlatformCanvas(
+ canvas_.reset(new gfx::PlatformCanvasWin(
paint_rect_.width(), paint_rect_.height(), true));
}
diff --git a/webkit/tools/test_shell/webwidget_host.h b/webkit/tools/test_shell/webwidget_host.h
index e0dde64..fd4dd87 100644
--- a/webkit/tools/test_shell/webwidget_host.h
+++ b/webkit/tools/test_shell/webwidget_host.h
@@ -39,7 +39,7 @@ class WebWidget;
class WebWidgetDelegate;
namespace gfx {
-class PlatformCanvas;
+class PlatformCanvasWin;
class Size;
}
@@ -91,7 +91,7 @@ class WebWidgetHost {
HWND hwnd_;
WebWidget* webwidget_;
- scoped_ptr<gfx::PlatformCanvas> canvas_;
+ scoped_ptr<gfx::PlatformCanvasWin> canvas_;
// specifies the portion of the webwidget that needs painting
gfx::Rect paint_rect_;