Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h

Issue 17633: Push drawPath() call into PlatformContextSkia to avoid juggling two copies of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void setPattern(SkShader*); 109 void setPattern(SkShader*);
110 void setDashPathEffect(SkDashPathEffect*); 110 void setDashPathEffect(SkDashPathEffect*);
111 111
112 SkDrawLooper* getDrawLooper() const; 112 SkDrawLooper* getDrawLooper() const;
113 WebCore::StrokeStyle getStrokeStyle() const; 113 WebCore::StrokeStyle getStrokeStyle() const;
114 float getStrokeThickness() const; 114 float getStrokeThickness() const;
115 int getTextDrawingMode() const; 115 int getTextDrawingMode() const;
116 116
117 void beginPath(); 117 void beginPath();
118 void addPath(const SkPath&); 118 void addPath(const SkPath&);
119 const SkPath* currentPathInGlobalCoordinates() const { return &m_path; } 119 // Returns the current path in local coordinates.
120 SkPath currentPathInLocalCoordinates() const; 120 SkPath currentPath() const;
121 121
122 SkColor fillColor() const; 122 SkColor fillColor() const;
123 123
124 skia::PlatformCanvas* canvas() { return m_canvas; } 124 skia::PlatformCanvas* canvas() { return m_canvas; }
125 125
126 // FIXME: This should be pushed down to GraphicsContext. 126 // FIXME: This should be pushed down to GraphicsContext.
127 void drawRect(SkRect rect); 127 void drawRect(SkRect rect);
128 128
129 // FIXME: I'm still unsure how I will serialize this call. 129 // FIXME: I'm still unsure how I will serialize this call.
130 void paintSkPaint(const SkRect&, const SkPaint&); 130 void paintSkPaint(const SkRect&, const SkPaint&);
(...skipping 24 matching lines...) Expand all
155 // NULL indicates painting is disabled. Never delete this object. 155 // NULL indicates painting is disabled. Never delete this object.
156 skia::PlatformCanvas* m_canvas; 156 skia::PlatformCanvas* m_canvas;
157 157
158 // States stack. Enables local drawing state change with save()/restore() 158 // States stack. Enables local drawing state change with save()/restore()
159 // calls. 159 // calls.
160 WTF::Vector<State> m_stateStack; 160 WTF::Vector<State> m_stateStack;
161 // Pointer to the current drawing state. This is a cached value of 161 // Pointer to the current drawing state. This is a cached value of
162 // mStateStack.back(). 162 // mStateStack.back().
163 State* m_state; 163 State* m_state;
164 164
165 // Current path. 165 // Current path in global coordinates.
166 SkPath m_path; 166 SkPath m_path;
167 167
168 #if defined(__linux__) 168 #if defined(__linux__)
169 // A pointer to a GDK Drawable wrapping of this Skia canvas 169 // A pointer to a GDK Drawable wrapping of this Skia canvas
170 GdkSkia* m_gdkskia; 170 GdkSkia* m_gdkskia;
171 #endif 171 #endif
172 }; 172 };
173 173
174 #endif // PlatformContextSkia_h 174 #endif // PlatformContextSkia_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698