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

Unified Diff: skia/ext/cdl_paint.cc

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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
« no previous file with comments | « skia/ext/cdl_paint.h ('k') | skia/ext/cdl_picture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/cdl_paint.cc
diff --git a/skia/ext/cdl_paint.cc b/skia/ext/cdl_paint.cc
new file mode 100644
index 0000000000000000000000000000000000000000..520f10d2502dd8f4239200b5dd7299e0b9e3f63c
--- /dev/null
+++ b/skia/ext/cdl_paint.cc
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "cdl_paint.h"
+
+#if CDL_ENABLED
+
+#include <cstdlib>
+
+#include "base/logging.h"
+#include "cdl_shader.h"
+
+CdlPaint::CdlPaint() {}
+CdlPaint::~CdlPaint() {}
+
+CdlPaint::CdlPaint(const CdlPaint& paint)
+ : paint_(paint.paint_), shader_(paint.shader_) {}
+
+SkPaint CdlPaint::toSkPaint() const {
+ SkPaint paint = paint_;
+ if (shader_.get())
+ paint.setShader(shader_->createSkShader());
+ return paint;
+}
+
+#endif // CDL_ENABLED
« no previous file with comments | « skia/ext/cdl_paint.h ('k') | skia/ext/cdl_picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698