| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 return; | 323 return; |
| 324 | 324 |
| 325 mutableState()->clearDrawLooper(); | 325 mutableState()->clearDrawLooper(); |
| 326 } | 326 } |
| 327 | 327 |
| 328 bool GraphicsContext::hasShadow() const | 328 bool GraphicsContext::hasShadow() const |
| 329 { | 329 { |
| 330 return !!immutableState()->drawLooper(); | 330 return !!immutableState()->drawLooper(); |
| 331 } | 331 } |
| 332 | 332 |
| 333 FloatRect GraphicsContext::getClipBounds() const | |
| 334 { | |
| 335 if (paintingDisabled()) | |
| 336 return FloatRect(); | |
| 337 SkRect rect; | |
| 338 if (!m_canvas->getClipBounds(&rect)) | |
| 339 return FloatRect(); | |
| 340 return FloatRect(rect); | |
| 341 } | |
| 342 | |
| 343 bool GraphicsContext::getTransformedClipBounds(FloatRect* bounds) const | 333 bool GraphicsContext::getTransformedClipBounds(FloatRect* bounds) const |
| 344 { | 334 { |
| 345 if (paintingDisabled()) | 335 if (paintingDisabled()) |
| 346 return false; | 336 return false; |
| 347 SkIRect skIBounds; | 337 SkIRect skIBounds; |
| 348 if (!m_canvas->getClipDeviceBounds(&skIBounds)) | 338 if (!m_canvas->getClipDeviceBounds(&skIBounds)) |
| 349 return false; | 339 return false; |
| 350 SkRect skBounds = SkRect::MakeFromIRect(skIBounds); | 340 SkRect skBounds = SkRect::MakeFromIRect(skIBounds); |
| 351 *bounds = FloatRect(skBounds); | 341 *bounds = FloatRect(skBounds); |
| 352 return true; | 342 return true; |
| (...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 | 1875 |
| 1886 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) | 1876 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) |
| 1887 { | 1877 { |
| 1888 if (m_trackTextRegion) { | 1878 if (m_trackTextRegion) { |
| 1889 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); | 1879 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); |
| 1890 m_textRegion.join(textRect); | 1880 m_textRegion.join(textRect); |
| 1891 } | 1881 } |
| 1892 } | 1882 } |
| 1893 | 1883 |
| 1894 } | 1884 } |
| OLD | NEW |