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

Side by Side Diff: src/views/SkView.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « src/views/SkOSMenu.cpp ('k') | src/views/mac/SkNSView.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkView.h" 8 #include "SkView.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 10
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 matrix->preConcat(view->getLocalMatrix()); 630 matrix->preConcat(view->getLocalMatrix());
631 matrix->preTranslate(-view->fLoc.fX, -view->fLoc.fY); 631 matrix->preTranslate(-view->fLoc.fX, -view->fLoc.fY);
632 view = view->fParent; 632 view = view->fParent;
633 } 633 }
634 } 634 }
635 } 635 }
636 bool SkView::globalToLocal(SkScalar x, SkScalar y, SkPoint* local) const 636 bool SkView::globalToLocal(SkScalar x, SkScalar y, SkPoint* local) const
637 { 637 {
638 SkASSERT(this); 638 SkASSERT(this);
639 639
640 if (NULL != local) { 640 if (local) {
641 SkMatrix m; 641 SkMatrix m;
642 this->localToGlobal(&m); 642 this->localToGlobal(&m);
643 if (!m.invert(&m)) { 643 if (!m.invert(&m)) {
644 return false; 644 return false;
645 } 645 }
646 SkPoint p; 646 SkPoint p;
647 m.mapXY(x, y, &p); 647 m.mapXY(x, y, &p);
648 local->set(p.fX, p.fY); 648 local->set(p.fX, p.fY);
649 } 649 }
650 650
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 SkDebugf(" />\n"); 834 SkDebugf(" />\n");
835 } 835 }
836 } 836 }
837 837
838 void SkView::dump(bool recurse) const 838 void SkView::dump(bool recurse) const
839 { 839 {
840 dumpview(this, 0, recurse); 840 dumpview(this, 0, recurse);
841 } 841 }
842 842
843 #endif 843 #endif
OLDNEW
« no previous file with comments | « src/views/SkOSMenu.cpp ('k') | src/views/mac/SkNSView.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698