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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp

Issue 1397583002: Implement the framework for a paint property hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Job insecurity: better tests, better comments, better names. 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 #include "config.h" 5 #include "config.h"
6 #include "platform/graphics/paint/PaintChunker.h" 6 #include "platform/graphics/paint/PaintChunker.h"
7 7
8 #include "platform/RuntimeEnabledFeatures.h" 8 #include "platform/RuntimeEnabledFeatures.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 PaintChunker::PaintChunker() 12 PaintChunker::PaintChunker()
13 { 13 {
14 } 14 }
15 15
16 PaintChunker::~PaintChunker() 16 PaintChunker::~PaintChunker()
17 { 17 {
18 } 18 }
19 19
20 void PaintChunker::updateCurrentPaintProperties(const PaintProperties& propertie s) 20 void PaintChunker::updateCurrentPaintChunkProperties(const PaintChunkProperties& properties)
21 { 21 {
22 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 22 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
23 23
24 m_currentProperties = properties; 24 m_currentProperties = properties;
25 } 25 }
26 26
27 void PaintChunker::incrementDisplayItemIndex() 27 void PaintChunker::incrementDisplayItemIndex()
28 { 28 {
29 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 29 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
30 30
(...skipping 22 matching lines...) Expand all
53 if ((lastChunk.endIndex - lastChunk.beginIndex) > 1) 53 if ((lastChunk.endIndex - lastChunk.beginIndex) > 1)
54 lastChunk.endIndex--; 54 lastChunk.endIndex--;
55 else 55 else
56 m_chunks.removeLast(); 56 m_chunks.removeLast();
57 } 57 }
58 58
59 Vector<PaintChunk> PaintChunker::releasePaintChunks() 59 Vector<PaintChunk> PaintChunker::releasePaintChunks()
60 { 60 {
61 Vector<PaintChunk> chunks; 61 Vector<PaintChunk> chunks;
62 chunks.swap(m_chunks); 62 chunks.swap(m_chunks);
63 m_currentProperties = PaintProperties(); 63 m_currentProperties = PaintChunkProperties();
64 return chunks; 64 return chunks;
65 } 65 }
66 66
67 } // namespace blink 67 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698