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

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

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mike's comments Created 6 years, 1 month 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // With Oilpan enabled, objects may end up being finalized without 82 // With Oilpan enabled, objects may end up being finalized without
83 // having been detached first. Consequently, the objects force 83 // having been detached first. Consequently, the objects force
84 // detachment first before deleting the platform object. Without 84 // detachment first before deleting the platform object. Without
85 // Oilpan, the objects will have been detached from the 'parent' 85 // Oilpan, the objects will have been detached from the 'parent'
86 // objects first and do not separately require it when finalizing. 86 // objects first and do not separately require it when finalizing.
87 // 87 //
88 // However, as detach() is trivial, the individual WebGL 88 // However, as detach() is trivial, the individual WebGL
89 // destructors will always call detachAndDeleteObject() rather 89 // destructors will always call detachAndDeleteObject() rather
90 // than do it based on Oilpan being enabled. 90 // than do it based on Oilpan being enabled.
91 detach(); 91 detach();
92 deleteObject(0); 92 deleteObject(nullptr);
93 } 93 }
94 94
95 void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d) 95 void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d)
96 { 96 {
97 if (m_attachmentCount) 97 if (m_attachmentCount)
98 --m_attachmentCount; 98 --m_attachmentCount;
99 if (m_deleted) 99 if (m_deleted)
100 deleteObject(context3d); 100 deleteObject(context3d);
101 } 101 }
102 102
103 } 103 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLFramebuffer.cpp ('k') | Source/core/html/canvas/WebGLRenderingContextBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698