OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 class SkPictureRecorder; | 42 class SkPictureRecorder; |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class IntSize; | 46 class IntSize; |
47 | 47 |
48 class PLATFORM_EXPORT DisplayList final : public WTF::RefCounted<DisplayList> { | 48 class PLATFORM_EXPORT DisplayList final : public WTF::RefCounted<DisplayList> { |
49 WTF_MAKE_FAST_ALLOCATED; | 49 WTF_MAKE_FAST_ALLOCATED; |
50 WTF_MAKE_NONCOPYABLE(DisplayList); | 50 WTF_MAKE_NONCOPYABLE(DisplayList); |
51 public: | 51 public: |
52 DisplayList(const FloatRect&); | 52 DisplayList(); |
53 ~DisplayList(); | 53 ~DisplayList(); |
54 | 54 |
55 const FloatRect& bounds() const; | |
56 | |
57 // This entry point will return 0 when the DisplayList is in the | 55 // This entry point will return 0 when the DisplayList is in the |
58 // midst of recording (i.e., between a beginRecording/endRecording pair) | 56 // midst of recording (i.e., between a beginRecording/endRecording pair) |
59 // and if no recording has ever been completed. Otherwise it will return | 57 // and if no recording has ever been completed. Otherwise it will return |
60 // the picture created by the last endRecording call. | 58 // the picture created by the last endRecording call. |
61 SkPicture* picture() const; | 59 SkPicture* picture() const; |
62 | 60 |
63 SkCanvas* beginRecording(const IntSize&, uint32_t recordFlags = 0); | 61 SkCanvas* beginRecording(const IntSize&, uint32_t recordFlags = 0); |
64 bool isRecording() const { return m_recorder; } | 62 bool isRecording() const { return m_recorder; } |
65 void endRecording(); | 63 void endRecording(); |
66 | 64 |
67 private: | 65 private: |
68 FloatRect m_bounds; | |
69 RefPtr<SkPicture> m_picture; | 66 RefPtr<SkPicture> m_picture; |
70 OwnPtr<SkPictureRecorder> m_recorder; | 67 OwnPtr<SkPictureRecorder> m_recorder; |
71 }; | 68 }; |
72 | 69 |
73 } // namespace blink | 70 } // namespace blink |
74 | 71 |
75 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_DISPLAYLIST_H_ | 72 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_DISPLAYLIST_H_ |
OLD | NEW |