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

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

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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
« no previous file with comments | « Source/core/html/canvas/WebGLObject.h ('k') | Source/core/html/canvas/WebGLProgram.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23 matching lines...) Expand all
34 , m_deleted(false) 34 , m_deleted(false)
35 { 35 {
36 } 36 }
37 37
38 WebGLObject::~WebGLObject() 38 WebGLObject::~WebGLObject()
39 { 39 {
40 // Verify that platform objects have been explicitly deleted. 40 // Verify that platform objects have been explicitly deleted.
41 ASSERT(m_deleted); 41 ASSERT(m_deleted);
42 } 42 }
43 43
44 void WebGLObject::deleteObject(blink::WebGraphicsContext3D* context3d) 44 void WebGLObject::deleteObject(WebGraphicsContext3D* context3d)
45 { 45 {
46 m_deleted = true; 46 m_deleted = true;
47 if (!hasObject()) 47 if (!hasObject())
48 return; 48 return;
49 49
50 if (!hasGroupOrContext()) 50 if (!hasGroupOrContext())
51 return; 51 return;
52 52
53 if (!m_attachmentCount) { 53 if (!m_attachmentCount) {
54 if (!context3d) 54 if (!context3d)
(...skipping 23 matching lines...) Expand all
78 // Oilpan, the objects will have been detached from the 'parent' 78 // Oilpan, the objects will have been detached from the 'parent'
79 // objects first and do not separately require it when finalizing. 79 // objects first and do not separately require it when finalizing.
80 // 80 //
81 // However, as detach() is trivial, the individual WebGL 81 // However, as detach() is trivial, the individual WebGL
82 // destructors will always call detachAndDeleteObject() rather 82 // destructors will always call detachAndDeleteObject() rather
83 // than do it based on Oilpan being enabled. 83 // than do it based on Oilpan being enabled.
84 detach(); 84 detach();
85 deleteObject(nullptr); 85 deleteObject(nullptr);
86 } 86 }
87 87
88 void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d) 88 void WebGLObject::onDetached(WebGraphicsContext3D* context3d)
89 { 89 {
90 if (m_attachmentCount) 90 if (m_attachmentCount)
91 --m_attachmentCount; 91 --m_attachmentCount;
92 if (m_deleted) 92 if (m_deleted)
93 deleteObject(context3d); 93 deleteObject(context3d);
94 } 94 }
95 95
96 } 96 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLObject.h ('k') | Source/core/html/canvas/WebGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698