Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: Source/platform/graphics/ReplayingCanvas.h

Issue 1183863005: Paint Profiler: unroll SkPictures (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 30 matching lines...) Expand all
41 template<> class CanvasInterceptor<ReplayingCanvas> : protected InterceptingCanv asBase::CanvasInterceptorBase<ReplayingCanvas> { 41 template<> class CanvasInterceptor<ReplayingCanvas> : protected InterceptingCanv asBase::CanvasInterceptorBase<ReplayingCanvas> {
42 public: 42 public:
43 CanvasInterceptor(InterceptingCanvasBase* canvas) : InterceptingCanvasBase:: CanvasInterceptorBase<ReplayingCanvas>(canvas) { } 43 CanvasInterceptor(InterceptingCanvasBase* canvas) : InterceptingCanvasBase:: CanvasInterceptorBase<ReplayingCanvas>(canvas) { }
44 ~CanvasInterceptor(); 44 ~CanvasInterceptor();
45 }; 45 };
46 46
47 class ReplayingCanvas : public InterceptingCanvas<ReplayingCanvas>, public SkPic ture::AbortCallback { 47 class ReplayingCanvas : public InterceptingCanvas<ReplayingCanvas>, public SkPic ture::AbortCallback {
48 public: 48 public:
49 ReplayingCanvas(SkBitmap, unsigned fromStep, unsigned toStep); 49 ReplayingCanvas(SkBitmap, unsigned fromStep, unsigned toStep);
50 50
51 virtual bool abort() override; 51 bool abort() override;
52 virtual SkCanvas::SaveLayerStrategy willSaveLayer(const SkRect* bounds, cons t SkPaint*, SaveFlags) override; 52 SkCanvas::SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPain t*, SaveFlags) override;
53 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri de;
53 54
54 private: 55 private:
55 friend class CanvasInterceptor<ReplayingCanvas>; 56 friend class CanvasInterceptor<ReplayingCanvas>;
56 57
57 void updateInRange(); 58 void updateInRange();
58 59
59 unsigned m_fromStep; 60 unsigned m_fromStep;
60 unsigned m_toStep; 61 unsigned m_toStep;
61 bool m_abortDrawing; 62 bool m_abortDrawing;
62 }; 63 };
63 64
64 } // namespace blink 65 } // namespace blink
65 66
66 #endif // ReplayingCanvas_h 67 #endif // ReplayingCanvas_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698