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

Side by Side Diff: skia/ext/skia_utils_mac.mm

Issue 1508893003: Use proper namespace in skia/ext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 unified diff | Download patch
« no previous file with comments | « skia/ext/skia_utils_mac.h ('k') | skia/ext/skia_utils_mac_unittest.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "skia/ext/skia_utils_mac.h" 5 #include "skia/ext/skia_utils_mac.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 hints:nil]; 78 hints:nil];
79 } 79 }
80 80
81 [NSGraphicsContext restoreGraphicsState]; 81 [NSGraphicsContext restoreGraphicsState];
82 82
83 return bitmap; 83 return bitmap;
84 } 84 }
85 85
86 } // namespace 86 } // namespace
87 87
88 namespace gfx { 88 namespace skia {
89 89
90 CGAffineTransform SkMatrixToCGAffineTransform(const SkMatrix& matrix) { 90 CGAffineTransform SkMatrixToCGAffineTransform(const SkMatrix& matrix) {
91 // CGAffineTransforms don't support perspective transforms, so make sure 91 // CGAffineTransforms don't support perspective transforms, so make sure
92 // we don't get those. 92 // we don't get those.
93 DCHECK(matrix[SkMatrix::kMPersp0] == 0.0f); 93 DCHECK(matrix[SkMatrix::kMPersp0] == 0.0f);
94 DCHECK(matrix[SkMatrix::kMPersp1] == 0.0f); 94 DCHECK(matrix[SkMatrix::kMPersp1] == 0.0f);
95 DCHECK(matrix[SkMatrix::kMPersp2] == 1.0f); 95 DCHECK(matrix[SkMatrix::kMPersp2] == 1.0f);
96 96
97 return CGAffineTransformMake(matrix[SkMatrix::kMScaleX], 97 return CGAffineTransformMake(matrix[SkMatrix::kMScaleX],
98 matrix[SkMatrix::kMSkewY], 98 matrix[SkMatrix::kMSkewY],
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 459
460 CGContextConcatCTM(cgContext_, SkMatrixToCGAffineTransform(matrix)); 460 CGContextConcatCTM(cgContext_, SkMatrixToCGAffineTransform(matrix));
461 461
462 return cgContext_; 462 return cgContext_;
463 } 463 }
464 464
465 bool SkiaBitLocker::hasEmptyClipRegion() const { 465 bool SkiaBitLocker::hasEmptyClipRegion() const {
466 return canvas_->isClipEmpty(); 466 return canvas_->isClipEmpty();
467 } 467 }
468 468
469 } // namespace gfx 469 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/skia_utils_mac.h ('k') | skia/ext/skia_utils_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698