OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 return !!immutableState()->drawLooper(); | 341 return !!immutableState()->drawLooper(); |
342 } | 342 } |
343 | 343 |
344 bool GraphicsContext::getTransformedClipBounds(FloatRect* bounds) const | 344 bool GraphicsContext::getTransformedClipBounds(FloatRect* bounds) const |
345 { | 345 { |
346 if (contextDisabled()) | 346 if (contextDisabled()) |
347 return false; | 347 return false; |
348 SkIRect skIBounds; | 348 SkIRect skIBounds; |
349 if (!m_canvas->getClipDeviceBounds(&skIBounds)) | 349 if (!m_canvas->getClipDeviceBounds(&skIBounds)) |
350 return false; | 350 return false; |
351 SkRect skBounds = SkRect::MakeFromIRect(skIBounds); | 351 SkRect skBounds = SkRect::Make(skIBounds); |
352 *bounds = FloatRect(skBounds); | 352 *bounds = FloatRect(skBounds); |
353 return true; | 353 return true; |
354 } | 354 } |
355 | 355 |
356 SkMatrix GraphicsContext::getTotalMatrix() const | 356 SkMatrix GraphicsContext::getTotalMatrix() const |
357 { | 357 { |
358 if (contextDisabled()) | 358 if (contextDisabled()) |
359 return SkMatrix::I(); | 359 return SkMatrix::I(); |
360 | 360 |
361 if (!isRecording()) | 361 if (!isRecording()) |
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1844 | 1844 |
1845 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) | 1845 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) |
1846 { | 1846 { |
1847 if (m_trackTextRegion) { | 1847 if (m_trackTextRegion) { |
1848 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); | 1848 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); |
1849 m_textRegion.join(textRect); | 1849 m_textRegion.join(textRect); |
1850 } | 1850 } |
1851 } | 1851 } |
1852 | 1852 |
1853 } | 1853 } |
OLD | NEW |