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

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

Issue 1170523002: Removing GraphicsContext from ImageBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix unit test crashes 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 unified diff | Download patch | Annotate | Revision Log
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 , m_displayItemList(displayItemList) 93 , m_displayItemList(displayItemList)
94 , m_paintStateStack() 94 , m_paintStateStack()
95 , m_paintStateIndex(0) 95 , m_paintStateIndex(0)
96 #if ENABLE(ASSERT) 96 #if ENABLE(ASSERT)
97 , m_layerCount(0) 97 , m_layerCount(0)
98 , m_disableDestructionChecks(false) 98 , m_disableDestructionChecks(false)
99 , m_inDrawingRecorder(false) 99 , m_inDrawingRecorder(false)
100 #endif 100 #endif
101 , m_disabledState(disableContextOrPainting) 101 , m_disabledState(disableContextOrPainting)
102 , m_deviceScaleFactor(1.0f) 102 , m_deviceScaleFactor(1.0f)
103 , m_accelerated(false)
104 , m_printing(false) 103 , m_printing(false)
105 { 104 {
106 // FIXME: Do some tests to determine how many states are typically used, and allocate 105 // FIXME: Do some tests to determine how many states are typically used, and allocate
107 // several here. 106 // several here.
108 m_paintStateStack.append(GraphicsContextState::create()); 107 m_paintStateStack.append(GraphicsContextState::create());
109 m_paintState = m_paintStateStack.last().get(); 108 m_paintState = m_paintStateStack.last().get();
110 109
111 if (contextDisabled()) { 110 if (contextDisabled()) {
112 DEFINE_STATIC_LOCAL(RefPtr<SkCanvas>, nullCanvas, (adoptRef(SkCreateNull Canvas()))); 111 DEFINE_STATIC_LOCAL(RefPtr<SkCanvas>, nullCanvas, (adoptRef(SkCreateNull Canvas())));
113 m_canvas = nullCanvas.get(); 112 m_canvas = nullCanvas.get();
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 static const SkPMColor colors[] = { 1559 static const SkPMColor colors[] = {
1561 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red 1560 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red
1562 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray 1561 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray
1563 }; 1562 };
1564 1563
1565 return colors[index]; 1564 return colors[index];
1566 } 1565 }
1567 #endif 1566 #endif
1568 1567
1569 } // namespace blink 1568 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698