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

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: 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 | « no previous file | no next file » | 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 hints:nil]; 77 hints:nil];
78 } 78 }
79 79
80 [NSGraphicsContext restoreGraphicsState]; 80 [NSGraphicsContext restoreGraphicsState];
81 81
82 return bitmap; 82 return bitmap;
83 } 83 }
84 84
85 } // namespace 85 } // namespace
86 86
87 namespace gfx { 87 namespace skia {
mtklein_C 2015/12/07 22:13:54 If this is the only change we're making, how does
scroggo 2015/12/08 23:11:17 I was overeager. I was relying on the bots to make
88 88
89 CGAffineTransform SkMatrixToCGAffineTransform(const SkMatrix& matrix) { 89 CGAffineTransform SkMatrixToCGAffineTransform(const SkMatrix& matrix) {
90 // CGAffineTransforms don't support perspective transforms, so make sure 90 // CGAffineTransforms don't support perspective transforms, so make sure
91 // we don't get those. 91 // we don't get those.
92 DCHECK(matrix[SkMatrix::kMPersp0] == 0.0f); 92 DCHECK(matrix[SkMatrix::kMPersp0] == 0.0f);
93 DCHECK(matrix[SkMatrix::kMPersp1] == 0.0f); 93 DCHECK(matrix[SkMatrix::kMPersp1] == 0.0f);
94 DCHECK(matrix[SkMatrix::kMPersp2] == 1.0f); 94 DCHECK(matrix[SkMatrix::kMPersp2] == 1.0f);
95 95
96 return CGAffineTransformMake(matrix[SkMatrix::kMScaleX], 96 return CGAffineTransformMake(matrix[SkMatrix::kMScaleX],
97 matrix[SkMatrix::kMSkewY], 97 matrix[SkMatrix::kMSkewY],
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 CGContextConcatCTM(cgContext_, SkMatrixToCGAffineTransform(matrix)); 453 CGContextConcatCTM(cgContext_, SkMatrixToCGAffineTransform(matrix));
454 454
455 return cgContext_; 455 return cgContext_;
456 } 456 }
457 457
458 bool SkiaBitLocker::hasEmptyClipRegion() const { 458 bool SkiaBitLocker::hasEmptyClipRegion() const {
459 return canvas_->isClipEmpty(); 459 return canvas_->isClipEmpty();
460 } 460 }
461 461
462 } // namespace gfx 462 } // namespace skia
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698