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

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

Issue 1602513004: Remove PaintInfo's paintingRoot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for landing Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/ViewPainter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/PaintController.h" 10 #include "platform/graphics/paint/PaintController.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
13 #include "wtf/OwnPtr.h" 13 #include "wtf/OwnPtr.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 // When slimming paint ships we can remove this SkPicture abstraction and 17 // When slimming paint ships we can remove this SkPicture abstraction and
18 // rely on PaintController here. 18 // rely on PaintController here.
19 class SkPictureBuilder final { 19 class SkPictureBuilder final {
20 WTF_MAKE_NONCOPYABLE(SkPictureBuilder); 20 WTF_MAKE_NONCOPYABLE(SkPictureBuilder);
21 STACK_ALLOCATED();
22 public: 21 public:
23 SkPictureBuilder(const FloatRect& bounds, SkMetaData* metaData = nullptr, Gr aphicsContext* containingContext = nullptr) 22 SkPictureBuilder(const FloatRect& bounds, SkMetaData* metaData = nullptr, Gr aphicsContext* containingContext = nullptr)
24 : m_bounds(bounds) 23 : m_bounds(bounds)
25 { 24 {
26 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDis abled; 25 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDis abled;
27 if (containingContext && containingContext->contextDisabled()) 26 if (containingContext && containingContext->contextDisabled())
28 disabledMode = GraphicsContext::FullyDisabled; 27 disabledMode = GraphicsContext::FullyDisabled;
29 28
30 m_paintController = PaintController::create(); 29 m_paintController = PaintController::create();
31 m_paintController->beginSkippingCache(); 30 m_paintController->beginSkippingCache();
(...skipping 18 matching lines...) Expand all
50 49
51 private: 50 private:
52 OwnPtr<PaintController> m_paintController; 51 OwnPtr<PaintController> m_paintController;
53 OwnPtr<GraphicsContext> m_context; 52 OwnPtr<GraphicsContext> m_context;
54 FloatRect m_bounds; 53 FloatRect m_bounds;
55 }; 54 };
56 55
57 } // namespace blink 56 } // namespace blink
58 57
59 #endif // SkPictureBuilder_h 58 #endif // SkPictureBuilder_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ViewPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698