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

Unified Diff: cc/base/scale_translate2d.cc

Issue 2563743004: [3/5] Add translated rasterization support for RasterBuffer & below (Closed)
Patch Set: 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
Index: cc/base/scale_translate2d.cc
diff --git a/cc/base/scale_translate2d.cc b/cc/base/scale_translate2d.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a6d2a1a49143f7629ce24a5c2c039ca93ea137fa
--- /dev/null
+++ b/cc/base/scale_translate2d.cc
@@ -0,0 +1,16 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/base/scale_translate2d.h"
+
+#include "third_party/skia/include/core/SkCanvas.h"
+
+namespace cc {
+
+void ScaleTranslate2d::ApplyToCanvas(SkCanvas* canvas) const {
+ canvas->translate(translation_.x(), translation_.y());
+ canvas->scale(scale_, scale_);
+}
+
+} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698