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

Unified Diff: Source/platform/graphics/paint/DisplayItemListContextRecorder.h

Issue 1160183003: Use SkPictureBuilder in SVGShapePainter, and generalize SkPictureBuilder. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/GeneratedImage.cpp ('k') | Source/platform/graphics/paint/SkPictureBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItemListContextRecorder.h
diff --git a/Source/platform/graphics/paint/DisplayItemListContextRecorder.h b/Source/platform/graphics/paint/DisplayItemListContextRecorder.h
deleted file mode 100644
index a61a62090d36e5af045bb1e638cd3fef9ac5458b..0000000000000000000000000000000000000000
--- a/Source/platform/graphics/paint/DisplayItemListContextRecorder.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef DisplayItemListContextRecorder_h
-#define DisplayItemListContextRecorder_h
-
-#include "platform/RuntimeEnabledFeatures.h"
-#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/paint/DisplayItemList.h"
-#include "wtf/OwnPtr.h"
-
-namespace blink {
-
-class DisplayItemListContextRecorder {
- WTF_MAKE_NONCOPYABLE(DisplayItemListContextRecorder);
- STACK_ALLOCATED();
-public:
- DisplayItemListContextRecorder(GraphicsContext& context)
- : m_initialContext(context)
- {
- if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
- return;
-
- m_displayItemList = DisplayItemList::create();
- m_displayItemListContext = adoptPtr(new GraphicsContext(m_displayItemList.get(),
- context.contextDisabled() ? GraphicsContext::FullyDisabled : GraphicsContext::NothingDisabled));
- m_displayItemListContext->setDeviceScaleFactor(context.deviceScaleFactor());
- m_displayItemListContext->setPrinting(context.printing());
- }
-
- ~DisplayItemListContextRecorder()
- {
- if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
- return;
-
- ASSERT(m_displayItemList);
- m_displayItemList->commitNewDisplayItemsAndReplay(m_initialContext);
- }
-
- GraphicsContext& context() const { return m_displayItemList ? *m_displayItemListContext : m_initialContext; }
-
-private:
- GraphicsContext& m_initialContext;
- OwnPtr<DisplayItemList> m_displayItemList;
- OwnPtr<GraphicsContext> m_displayItemListContext;
-};
-
-} // namespace blink
-
-#endif // DisplayItemListContextRecorder_h
« no previous file with comments | « Source/platform/graphics/GeneratedImage.cpp ('k') | Source/platform/graphics/paint/SkPictureBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698