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

Unified Diff: ash/launcher/overflow_button.cc

Issue 11418040: gfx::Transform API clean-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 | « no previous file | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/overflow_button.cc
diff --git a/ash/launcher/overflow_button.cc b/ash/launcher/overflow_button.cc
index caa58a5055202370fb108676b43843a00bde5133..0a853bbcde549d04d4be2cfaebcbd0d6412f9bc2 100644
--- a/ash/launcher/overflow_button.cc
+++ b/ash/launcher/overflow_button.cc
@@ -29,15 +29,19 @@ const int kButtonHoverSize = 28;
const int kBackgroundOffset = (48 - kButtonHoverSize) / 2;
void RotateCounterclockwise(gfx::Transform* transform) {
- transform->matrix().set3x3(0, -1, 0,
- 1, 0, 0,
- 0, 0, 1);
+ SkMatrix44 rotation;
+ rotation.set3x3(0, -1, 0,
+ 1, 0, 0,
+ 0, 0, 1);
+ transform->matrix().preConcat(rotation);
}
void RotateClockwise(gfx::Transform* transform) {
- transform->matrix().set3x3( 0, 1, 0,
- -1, 0, 0,
- 0, 0, 1);
+ SkMatrix44 rotation;
+ rotation.set3x3( 0, 1, 0,
+ -1, 0, 0,
+ 0, 0, 1);
+ transform->matrix().preConcat(rotation);
}
} // namesapce
@@ -112,15 +116,15 @@ void OverflowButton::OnPaint(gfx::Canvas* canvas) {
switch (alignment_) {
case SHELF_ALIGNMENT_BOTTOM:
// Shift 1 pixel left to align with overflow bubble tip.
- transform.ConcatTranslate(-1, kBackgroundOffset);
+ transform.Translate(-1, kBackgroundOffset);
break;
case SHELF_ALIGNMENT_LEFT:
+ transform.Translate(kBackgroundOffset, -1);
RotateClockwise(&transform);
- transform.ConcatTranslate(kBackgroundOffset, -1);
break;
case SHELF_ALIGNMENT_RIGHT:
+ transform.Translate(kBackgroundOffset, height());
RotateCounterclockwise(&transform);
- transform.ConcatTranslate(kBackgroundOffset, height());
break;
}
« no previous file with comments | « no previous file | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698