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

Side by Side Diff: Source/core/html/canvas/WebGLContextAttributes.cpp

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Complete VectorTraits<> specialization for VertexAttribState Created 6 years, 5 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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above 9 * * Redistributions in binary form must reproduce the above
10 * copyright notice, this list of conditions and the following disclaimer 10 * copyright notice, this list of conditions and the following disclaimer
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 28
29 #include "core/html/canvas/WebGLContextAttributes.h" 29 #include "core/html/canvas/WebGLContextAttributes.h"
30 30
31 #include "core/frame/Settings.h" 31 #include "core/frame/Settings.h"
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 PassRefPtr<WebGLContextAttributes> WebGLContextAttributes::create() 35 PassRefPtrWillBeRawPtr<WebGLContextAttributes> WebGLContextAttributes::create()
36 { 36 {
37 return adoptRef(new WebGLContextAttributes()); 37 return adoptRefWillBeNoop(new WebGLContextAttributes());
38 } 38 }
39 39
40 WebGLContextAttributes::WebGLContextAttributes() 40 WebGLContextAttributes::WebGLContextAttributes()
41 : CanvasContextAttributes() 41 : CanvasContextAttributes()
42 , m_alpha(true) 42 , m_alpha(true)
43 , m_depth(true) 43 , m_depth(true)
44 , m_stencil(false) 44 , m_stencil(false)
45 , m_antialias(true) 45 , m_antialias(true)
46 , m_premultipliedAlpha(true) 46 , m_premultipliedAlpha(true)
47 , m_preserveDrawingBuffer(false) 47 , m_preserveDrawingBuffer(false)
(...skipping 12 matching lines...) Expand all
60 , m_preserveDrawingBuffer(attrs.m_preserveDrawingBuffer) 60 , m_preserveDrawingBuffer(attrs.m_preserveDrawingBuffer)
61 , m_failIfMajorPerformanceCaveat(attrs.m_failIfMajorPerformanceCaveat) 61 , m_failIfMajorPerformanceCaveat(attrs.m_failIfMajorPerformanceCaveat)
62 { 62 {
63 ScriptWrappable::init(this); 63 ScriptWrappable::init(this);
64 } 64 }
65 65
66 WebGLContextAttributes::~WebGLContextAttributes() 66 WebGLContextAttributes::~WebGLContextAttributes()
67 { 67 {
68 } 68 }
69 69
70 PassRefPtr<WebGLContextAttributes> WebGLContextAttributes::clone() const 70 PassRefPtrWillBeRawPtr<WebGLContextAttributes> WebGLContextAttributes::clone() c onst
71 { 71 {
72 return adoptRef(new WebGLContextAttributes(*this)); 72 return adoptRefWillBeNoop(new WebGLContextAttributes(*this));
73 } 73 }
74 74
75 bool WebGLContextAttributes::alpha() const 75 bool WebGLContextAttributes::alpha() const
76 { 76 {
77 return m_alpha; 77 return m_alpha;
78 } 78 }
79 79
80 void WebGLContextAttributes::setAlpha(bool alpha) 80 void WebGLContextAttributes::setAlpha(bool alpha)
81 { 81 {
82 m_alpha = alpha; 82 m_alpha = alpha;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 attrs.noExtensions = true; 161 attrs.noExtensions = true;
162 attrs.shareResources = false; 162 attrs.shareResources = false;
163 attrs.preferDiscreteGPU = true; 163 attrs.preferDiscreteGPU = true;
164 164
165 attrs.topDocumentURL = topDocumentURL; 165 attrs.topDocumentURL = topDocumentURL;
166 166
167 return attrs; 167 return attrs;
168 } 168 }
169 169
170 } // namespace WebCore 170 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698