| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012, Google Inc. All rights reserved. | 2 * Copyright (c) 2012, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 namespace blink { | 42 namespace blink { |
| 43 class GraphicsContext; | 43 class GraphicsContext; |
| 44 | 44 |
| 45 enum RegionTrackingMode { | 45 enum RegionTrackingMode { |
| 46 TrackOpaqueRegion, | 46 TrackOpaqueRegion, |
| 47 TRackOverwriteRegion | 47 TRackOverwriteRegion |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // This class is an encapsulation of functionality for GraphicsContext, and its
methods are mirrored | 50 // This class is an encapsulation of functionality for GraphicsContext, and its
methods are mirrored |
| 51 // there for the outside world. It tracks paints and computes what area will be
opaque. | 51 // there for the outside world. It tracks paints and computes what area will be
opaque. |
| 52 class PLATFORM_EXPORT RegionTracker FINAL { | 52 class PLATFORM_EXPORT RegionTracker final { |
| 53 public: | 53 public: |
| 54 RegionTracker(); | 54 RegionTracker(); |
| 55 | 55 |
| 56 // The resulting opaque region as a single rect. | 56 // The resulting opaque region as a single rect. |
| 57 IntRect asRect() const; | 57 IntRect asRect() const; |
| 58 | 58 |
| 59 void pushCanvasLayer(const SkPaint*); | 59 void pushCanvasLayer(const SkPaint*); |
| 60 void popCanvasLayer(const GraphicsContext*); | 60 void popCanvasLayer(const GraphicsContext*); |
| 61 | 61 |
| 62 void setImageMask(const SkRect& imageOpaqueRect); | 62 void setImageMask(const SkRect& imageOpaqueRect); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 SkRect m_opaqueRect; | 110 SkRect m_opaqueRect; |
| 111 RegionType m_trackedRegionType; | 111 RegionType m_trackedRegionType; |
| 112 | 112 |
| 113 Vector<CanvasLayerState, 3> m_canvasLayerStack; | 113 Vector<CanvasLayerState, 3> m_canvasLayerStack; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| 117 | 117 |
| 118 #endif // RegionTracker_h | 118 #endif // RegionTracker_h |
| OLD | NEW |