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

Unified Diff: third_party/WebKit/Source/web/tests/sim/SimCanvas.cpp

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/sim/SimCanvas.cpp
diff --git a/third_party/WebKit/Source/web/tests/sim/SimCanvas.cpp b/third_party/WebKit/Source/web/tests/sim/SimCanvas.cpp
index 9a7957facb48db7701f2ee7354053c44cc5dd410..2faf2c15bc0126f62e37636a119b0b46b3fe324c 100644
--- a/third_party/WebKit/Source/web/tests/sim/SimCanvas.cpp
+++ b/third_party/WebKit/Source/web/tests/sim/SimCanvas.cpp
@@ -4,6 +4,7 @@
#include "web/tests/sim/SimCanvas.h"
+#include "platform/graphics/paint/PaintFlags.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkRRect.h"
@@ -19,7 +20,7 @@ class DrawScope {
~DrawScope() { --s_depth; }
};
-SimCanvas::SimCanvas(int width, int height) : SkCanvas(width, height) {}
+SimCanvas::SimCanvas(int width, int height) : PaintCanvas(width, height) {}
void SimCanvas::addCommand(CommandType type, RGBA32 color) {
if (s_depth > 1)
@@ -28,95 +29,95 @@ void SimCanvas::addCommand(CommandType type, RGBA32 color) {
m_commands.push_back(command);
}
-void SimCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
+void SimCanvas::onDrawRect(const SkRect& rect, const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Rect, paint.getColor());
- SkCanvas::onDrawRect(rect, paint);
+ PaintCanvas::onDrawRect(rect, paint);
}
-void SimCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) {
+void SimCanvas::onDrawOval(const SkRect& oval, const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Shape, paint.getColor());
- SkCanvas::onDrawOval(oval, paint);
+ PaintCanvas::onDrawOval(oval, paint);
}
-void SimCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) {
+void SimCanvas::onDrawRRect(const SkRRect& rrect, const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Shape, paint.getColor());
- SkCanvas::onDrawRRect(rrect, paint);
+ PaintCanvas::onDrawRRect(rrect, paint);
}
-void SimCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
+void SimCanvas::onDrawPath(const SkPath& path, const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Shape, paint.getColor());
- SkCanvas::onDrawPath(path, paint);
+ PaintCanvas::onDrawPath(path, paint);
}
void SimCanvas::onDrawImage(const SkImage* image,
SkScalar left,
SkScalar top,
- const SkPaint* paint) {
+ const PaintFlags* paint) {
DrawScope scope;
addCommand(CommandType::Image);
- SkCanvas::onDrawImage(image, left, top, paint);
+ PaintCanvas::onDrawImage(image, left, top, paint);
}
void SimCanvas::onDrawImageRect(const SkImage* image,
const SkRect* src,
const SkRect& dst,
- const SkPaint* paint,
- SrcRectConstraint constraint) {
+ const PaintFlags* paint,
+ SkCanvas::SrcRectConstraint constraint) {
DrawScope scope;
addCommand(CommandType::Image);
- SkCanvas::onDrawImageRect(image, src, dst, paint, constraint);
+ PaintCanvas::onDrawImageRect(image, src, dst, paint, constraint);
}
void SimCanvas::onDrawText(const void* text,
size_t byteLength,
SkScalar x,
SkScalar y,
- const SkPaint& paint) {
+ const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Text, paint.getColor());
- SkCanvas::onDrawText(text, byteLength, x, y, paint);
+ PaintCanvas::onDrawText(text, byteLength, x, y, paint);
}
void SimCanvas::onDrawPosText(const void* text,
size_t byteLength,
const SkPoint pos[],
- const SkPaint& paint) {
+ const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Text, paint.getColor());
- SkCanvas::onDrawPosText(text, byteLength, pos, paint);
+ PaintCanvas::onDrawPosText(text, byteLength, pos, paint);
}
void SimCanvas::onDrawPosTextH(const void* text,
size_t byteLength,
const SkScalar xpos[],
SkScalar constY,
- const SkPaint& paint) {
+ const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Text, paint.getColor());
- SkCanvas::onDrawPosTextH(text, byteLength, xpos, constY, paint);
+ PaintCanvas::onDrawPosTextH(text, byteLength, xpos, constY, paint);
}
void SimCanvas::onDrawTextOnPath(const void* text,
size_t byteLength,
const SkPath& path,
const SkMatrix* matrix,
- const SkPaint& paint) {
+ const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Text, paint.getColor());
- SkCanvas::onDrawTextOnPath(text, byteLength, path, matrix, paint);
+ PaintCanvas::onDrawTextOnPath(text, byteLength, path, matrix, paint);
}
void SimCanvas::onDrawTextBlob(const SkTextBlob* blob,
SkScalar x,
SkScalar y,
- const SkPaint& paint) {
+ const PaintFlags& paint) {
DrawScope scope;
addCommand(CommandType::Text, paint.getColor());
- SkCanvas::onDrawTextBlob(blob, x, y, paint);
+ PaintCanvas::onDrawTextBlob(blob, x, y, paint);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimCanvas.h ('k') | third_party/WebKit/Source/web/tests/sim/SimDisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698