summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 17:46:46 +0000
committerpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 17:46:46 +0000
commit71f97014a63166729984c801564822b1701a6950 (patch)
tree9290941a53f3e1ae368c963194efc8170a4534c0
parent93b5730bc11d944d3e364b08294350d88e4ed284 (diff)
downloadchromium_src-71f97014a63166729984c801564822b1701a6950.zip
chromium_src-71f97014a63166729984c801564822b1701a6950.tar.gz
chromium_src-71f97014a63166729984c801564822b1701a6950.tar.bz2
Fix uses of PlatformCanvasWin and get compiling under gcc.
Review URL: http://codereview.chromium.org/1702 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1992 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/port/platform/graphics/SkPaintContext.cpp6
-rw-r--r--webkit/port/platform/graphics/SkPaintContext.h11
2 files changed, 8 insertions, 9 deletions
diff --git a/webkit/port/platform/graphics/SkPaintContext.cpp b/webkit/port/platform/graphics/SkPaintContext.cpp
index 71ea81f..57c8f4c 100644
--- a/webkit/port/platform/graphics/SkPaintContext.cpp
+++ b/webkit/port/platform/graphics/SkPaintContext.cpp
@@ -27,14 +27,14 @@
// (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 <new>
+
#include "SkPaintContext.h"
#include "SkColorPriv.h"
#include "SkShader.h"
#include "SkDashPathEffect.h"
-#include "base/gfx/platform_canvas_win.h"
-
namespace {
int RoundToInt(float x) {
@@ -127,7 +127,7 @@ struct SkPaintContext::State {
};
// Context will be NULL if painting should be disabled.
-SkPaintContext::SkPaintContext(gfx::PlatformCanvasWin* context)
+SkPaintContext::SkPaintContext(gfx::PlatformCanvas* 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 6921a04..f068e50 100644
--- a/webkit/port/platform/graphics/SkPaintContext.h
+++ b/webkit/port/platform/graphics/SkPaintContext.h
@@ -5,15 +5,14 @@
#ifndef SkPaintContext_h
#define SkPaintContext_h
+#include "base/gfx/platform_canvas.h"
+
#include "SkDashPathEffect.h"
#include "SkDrawLooper.h"
#include "SkDeque.h"
#include "SkPaint.h"
#include "SkPath.h"
-namespace gfx {
-class PlatformCanvasWin;
-}
// This class is the interface to communicate to Skia. It is meant to be as
// opaque as possible. This class accept Skia native data format and not WebKit
@@ -35,7 +34,7 @@ class SkPaintContext {
};
// Context will be NULL if painting should be disabled.
- SkPaintContext(gfx::PlatformCanvasWin* context);
+ SkPaintContext(gfx::PlatformCanvas* context);
~SkPaintContext();
void save();
@@ -78,7 +77,7 @@ class SkPaintContext {
SkColor fillColor() const;
protected:
- gfx::PlatformCanvasWin* canvas() {
+ gfx::PlatformCanvas* canvas() {
return canvas_;
}
@@ -87,7 +86,7 @@ class SkPaintContext {
struct State;
// NULL indicates painting is disabled. Never delete this object.
- gfx::PlatformCanvasWin* canvas_;
+ gfx::PlatformCanvas* canvas_;
// States stack. Enables local drawing state change with save()/restore()
// calls.