OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. 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 are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 #define ANNOTATE_GRAPHICS_CONTEXT(paintInfo, renderer) \ | 35 #define ANNOTATE_GRAPHICS_CONTEXT(paintInfo, renderer) \ |
36 GraphicsContextAnnotator scopedGraphicsContextAnnotator; \ | 36 GraphicsContextAnnotator scopedGraphicsContextAnnotator; \ |
37 if (UNLIKELY(paintInfo.context->annotationMode())) \ | 37 if (UNLIKELY(paintInfo.context->annotationMode())) \ |
38 scopedGraphicsContextAnnotator.annotate(paintInfo, renderer) | 38 scopedGraphicsContextAnnotator.annotate(paintInfo, renderer) |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class GraphicsContext; | 42 class GraphicsContext; |
43 struct PaintInfo; | 43 struct PaintInfo; |
44 class RenderObject; | 44 class LayoutObject; |
45 | 45 |
46 class GraphicsContextAnnotator { | 46 class GraphicsContextAnnotator { |
47 public: | 47 public: |
48 GraphicsContextAnnotator() | 48 GraphicsContextAnnotator() |
49 : m_context(0) | 49 : m_context(0) |
50 { } | 50 { } |
51 | 51 |
52 ~GraphicsContextAnnotator() | 52 ~GraphicsContextAnnotator() |
53 { | 53 { |
54 if (UNLIKELY(m_context != 0)) | 54 if (UNLIKELY(m_context != 0)) |
55 finishAnnotation(); | 55 finishAnnotation(); |
56 } | 56 } |
57 | 57 |
58 void annotate(const PaintInfo&, const RenderObject*); | 58 void annotate(const PaintInfo&, const LayoutObject*); |
59 | 59 |
60 private: | 60 private: |
61 void finishAnnotation(); | 61 void finishAnnotation(); |
62 | 62 |
63 GraphicsContext* m_context; | 63 GraphicsContext* m_context; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
67 | 67 |
68 #endif // GraphicsContextAnnotator_h | 68 #endif // GraphicsContextAnnotator_h |
OLD | NEW |