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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.h

Issue 1396783003: Factor PaintArtifact out of DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@const-replay
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SkPictureBuilder_h 5 #ifndef SkPictureBuilder_h
6 #define SkPictureBuilder_h 6 #define SkPictureBuilder_h
7 7
8 #include "platform/RuntimeEnabledFeatures.h" 8 #include "platform/RuntimeEnabledFeatures.h"
9 #include "platform/graphics/GraphicsContext.h" 9 #include "platform/graphics/GraphicsContext.h"
10 #include "platform/graphics/paint/DisplayItemList.h" 10 #include "platform/graphics/paint/DisplayItemList.h"
(...skipping 21 matching lines...) Expand all
32 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor ()); 32 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor ());
33 m_context->setPrinting(containingContext->printing()); 33 m_context->setPrinting(containingContext->printing());
34 } 34 }
35 } 35 }
36 36
37 GraphicsContext& context() { return *m_context; } 37 GraphicsContext& context() { return *m_context; }
38 38
39 PassRefPtr<const SkPicture> endRecording() 39 PassRefPtr<const SkPicture> endRecording()
40 { 40 {
41 m_context->beginRecording(m_bounds); 41 m_context->beginRecording(m_bounds);
42 m_displayItemList->commitNewDisplayItemsAndReplay(*m_context); 42 m_displayItemList->commitNewDisplayItems();
43 m_displayItemList->paintArtifact().replay(*m_context);
43 return m_context->endRecording(); 44 return m_context->endRecording();
44 } 45 }
45 46
46 private: 47 private:
47 OwnPtr<DisplayItemList> m_displayItemList; 48 OwnPtr<DisplayItemList> m_displayItemList;
48 OwnPtr<GraphicsContext> m_context; 49 OwnPtr<GraphicsContext> m_context;
49 FloatRect m_bounds; 50 FloatRect m_bounds;
50 }; 51 };
51 52
52 } // namespace blink 53 } // namespace blink
53 54
54 #endif // SkPictureBuilder_h 55 #endif // SkPictureBuilder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698