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

Side by Side Diff: Source/core/html/canvas/WebGLObject.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: Rebase 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if (context3d) 63 if (context3d)
64 deleteObjectImpl(context3d, m_object); 64 deleteObjectImpl(context3d, m_object);
65 65
66 m_object = 0; 66 m_object = 0;
67 } 67 }
68 } 68 }
69 69
70 void WebGLObject::detach() 70 void WebGLObject::detach()
71 { 71 {
72 m_attachmentCount = 0; // Make sure OpenGL resource is deleted. 72 m_attachmentCount = 0; // Make sure OpenGL resource is deleted.
73 } 73 }
74
75 74
76 void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d) 75 void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d)
77 { 76 {
78 if (m_attachmentCount) 77 if (m_attachmentCount)
79 --m_attachmentCount; 78 --m_attachmentCount;
80 if (m_deleted) 79 if (m_deleted)
81 deleteObject(context3d); 80 deleteObject(context3d);
82 } 81 }
83 82
84 } 83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698