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

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

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #endif 70 #endif
71 m_disabledState(disableContextOrPainting), 71 m_disabledState(disableContextOrPainting),
72 m_deviceScaleFactor(1.0f), 72 m_deviceScaleFactor(1.0f),
73 m_printing(false), 73 m_printing(false),
74 m_hasMetaData(!!metaData) { 74 m_hasMetaData(!!metaData) {
75 if (metaData) 75 if (metaData)
76 m_metaData = *metaData; 76 m_metaData = *metaData;
77 77
78 // FIXME: Do some tests to determine how many states are typically used, and 78 // FIXME: Do some tests to determine how many states are typically used, and
79 // allocate several here. 79 // allocate several here.
80 m_paintStateStack.append(GraphicsContextState::create()); 80 m_paintStateStack.push_back(GraphicsContextState::create());
81 m_paintState = m_paintStateStack.back().get(); 81 m_paintState = m_paintStateStack.back().get();
82 82
83 if (contextDisabled()) { 83 if (contextDisabled()) {
84 DEFINE_STATIC_LOCAL(SkCanvas*, nullCanvas, (SkMakeNullCanvas().release())); 84 DEFINE_STATIC_LOCAL(SkCanvas*, nullCanvas, (SkMakeNullCanvas().release()));
85 m_canvas = nullCanvas; 85 m_canvas = nullCanvas;
86 } 86 }
87 } 87 }
88 88
89 GraphicsContext::~GraphicsContext() { 89 GraphicsContext::~GraphicsContext() {
90 #if DCHECK_IS_ON() 90 #if DCHECK_IS_ON()
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 static const SkPMColor colors[] = { 1414 static const SkPMColor colors[] = {
1415 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red 1415 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red
1416 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray 1416 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray
1417 }; 1417 };
1418 1418
1419 return colors[index]; 1419 return colors[index];
1420 } 1420 }
1421 #endif 1421 #endif
1422 1422
1423 } // namespace blink 1423 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698