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

Side by Side Diff: Source/core/html/canvas/OESVertexArrayObject.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: Smaller adjustments 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 OESVertexArrayObject::~OESVertexArrayObject() 43 OESVertexArrayObject::~OESVertexArrayObject()
44 { 44 {
45 } 45 }
46 46
47 WebGLExtensionName OESVertexArrayObject::name() const 47 WebGLExtensionName OESVertexArrayObject::name() const
48 { 48 {
49 return OESVertexArrayObjectName; 49 return OESVertexArrayObjectName;
50 } 50 }
51 51
52 PassRefPtr<OESVertexArrayObject> OESVertexArrayObject::create(WebGLRenderingCont extBase* context) 52 PassRefPtrWillBeRawPtr<OESVertexArrayObject> OESVertexArrayObject::create(WebGLR enderingContextBase* context)
53 { 53 {
54 return adoptRef(new OESVertexArrayObject(context)); 54 return adoptRefWillBeNoop(new OESVertexArrayObject(context));
55 } 55 }
56 56
57 PassRefPtr<WebGLVertexArrayObjectOES> OESVertexArrayObject::createVertexArrayOES () 57 PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> OESVertexArrayObject::createVe rtexArrayOES()
58 { 58 {
59 if (isLost()) 59 if (isLost())
60 return nullptr; 60 return nullptr;
61 61
62 RefPtr<WebGLVertexArrayObjectOES> o = WebGLVertexArrayObjectOES::create(m_co ntext, WebGLVertexArrayObjectOES::VaoTypeUser); 62 RefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> o = WebGLVertexArrayObjectOES: :create(m_context, WebGLVertexArrayObjectOES::VaoTypeUser);
63 m_context->addContextObject(o.get()); 63 m_context->addContextObject(o.get());
64 return o.release(); 64 return o.release();
65 } 65 }
66 66
67 void OESVertexArrayObject::deleteVertexArrayOES(WebGLVertexArrayObjectOES* array Object) 67 void OESVertexArrayObject::deleteVertexArrayOES(WebGLVertexArrayObjectOES* array Object)
68 { 68 {
69 if (!arrayObject || isLost()) 69 if (!arrayObject || isLost())
70 return; 70 return;
71 71
72 if (!arrayObject->isDefaultObject() && arrayObject == m_context->m_boundVert exArrayObject) 72 if (!arrayObject->isDefaultObject() && arrayObject == m_context->m_boundVert exArrayObject)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 { 111 {
112 return context->extensionsUtil()->supportsExtension("GL_OES_vertex_array_obj ect"); 112 return context->extensionsUtil()->supportsExtension("GL_OES_vertex_array_obj ect");
113 } 113 }
114 114
115 const char* OESVertexArrayObject::extensionName() 115 const char* OESVertexArrayObject::extensionName()
116 { 116 {
117 return "OES_vertex_array_object"; 117 return "OES_vertex_array_object";
118 } 118 }
119 119
120 } // namespace blink 120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698