OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "platform/mac/GraphicsContextCanvas.h" | 5 #include "platform/mac/GraphicsContextCanvas.h" |
6 | 6 |
7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 #import <CoreGraphics/CoreGraphics.h> | 8 #import <CoreGraphics/CoreGraphics.h> |
9 | 9 |
| 10 #include "platform/wtf/RetainPtr.h" |
10 #include "skia/ext/skia_utils_mac.h" | 11 #include "skia/ext/skia_utils_mac.h" |
11 #include "wtf/RetainPtr.h" | |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 GraphicsContextCanvas::GraphicsContextCanvas(PaintCanvas* canvas, | 15 GraphicsContextCanvas::GraphicsContextCanvas(PaintCanvas* canvas, |
16 const SkIRect& user_clip_rect, | 16 const SkIRect& user_clip_rect, |
17 SkScalar bitmap_scale_factor) | 17 SkScalar bitmap_scale_factor) |
18 : canvas_(canvas), | 18 : canvas_(canvas), |
19 cg_context_(0), | 19 cg_context_(0), |
20 bitmap_scale_factor_(bitmap_scale_factor), | 20 bitmap_scale_factor_(bitmap_scale_factor), |
21 use_device_bits_(false), | 21 use_device_bits_(false), |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 CGContextConcatCTM(cg_context_, skia::SkMatrixToCGAffineTransform(matrix)); | 128 CGContextConcatCTM(cg_context_, skia::SkMatrixToCGAffineTransform(matrix)); |
129 | 129 |
130 return cg_context_; | 130 return cg_context_; |
131 } | 131 } |
132 | 132 |
133 bool GraphicsContextCanvas::HasEmptyClipRegion() const { | 133 bool GraphicsContextCanvas::HasEmptyClipRegion() const { |
134 return canvas_->isClipEmpty(); | 134 return canvas_->isClipEmpty(); |
135 } | 135 } |
136 | 136 |
137 } // namespace blink | 137 } // namespace blink |
OLD | NEW |