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

Side by Side Diff: Source/core/paint/GraphicsContextRecorder.h

Issue 718943003: Rename updateIntrinsicContentLogicalHeight to setIntrinsicContentLogicalHeight (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tryin' again Created 6 years 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 | « Source/core/paint/ClipRecorder.cpp ('k') | Source/core/paint/GraphicsContextRecorder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GraphicsContextRecorder_h
6 #define GraphicsContextRecorder_h
7
8 #include "core/paint/ClipRecorder.h"
9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/graphics/GraphicsContextStateSaver.h"
11
12 namespace blink {
13
14 class GraphicsContextRecorder {
15 STACK_ALLOCATED();
16 public:
17 static GraphicsContextRecorder& currentRecorder() { return *s_currentRecorde r; }
18
19 GraphicsContextRecorder(GraphicsContext& context, bool saveAndRestore = true )
20 : m_stateSaver(context, saveAndRestore)
21 , m_parent(s_currentRecorder)
22 {
23 s_currentRecorder = this;
24 }
25
26 ~GraphicsContextRecorder()
27 {
28 ASSERT(s_currentRecorder == this);
29 s_currentRecorder = m_parent;
30 }
31
32 void addClipRecorder(PassOwnPtr<ClipRecorder> clipRecorder)
33 {
34 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
35 m_clipRecorders.append(clipRecorder);
36 }
37 private:
38 GraphicsContextStateSaver m_stateSaver;
39 GraphicsContextRecorder* m_parent;
40 Vector<OwnPtr<ClipRecorder>> m_clipRecorders;
41
42 static GraphicsContextRecorder* s_currentRecorder;
43 };
44
45 } // namespace blink
46
47 #endif // GraphicsContextRecorder_h
OLDNEW
« no previous file with comments | « Source/core/paint/ClipRecorder.cpp ('k') | Source/core/paint/GraphicsContextRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698