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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 1497683002: Make platform/graphics to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 #ifndef NDEBUG 57 #ifndef NDEBUG
58 WTF::RefCountedLeakCounter& drawingBufferCounter() 58 WTF::RefCountedLeakCounter& drawingBufferCounter()
59 { 59 {
60 DEFINE_STATIC_LOCAL(WTF::RefCountedLeakCounter, staticDrawingBufferCounter, ("DrawingBuffer")); 60 DEFINE_STATIC_LOCAL(WTF::RefCountedLeakCounter, staticDrawingBufferCounter, ("DrawingBuffer"));
61 return staticDrawingBufferCounter; 61 return staticDrawingBufferCounter;
62 } 62 }
63 #endif 63 #endif
64 64
65 class ScopedTextureUnit0BindingRestorer { 65 class ScopedTextureUnit0BindingRestorer {
66 STACK_ALLOCATED();
67 WTF_MAKE_NONCOPYABLE(ScopedTextureUnit0BindingRestorer);
66 public: 68 public:
67 ScopedTextureUnit0BindingRestorer(WebGraphicsContext3D* context, GLenum acti veTextureUnit, Platform3DObject textureUnitZeroId) 69 ScopedTextureUnit0BindingRestorer(WebGraphicsContext3D* context, GLenum acti veTextureUnit, Platform3DObject textureUnitZeroId)
68 : m_context(context) 70 : m_context(context)
69 , m_oldActiveTextureUnit(activeTextureUnit) 71 , m_oldActiveTextureUnit(activeTextureUnit)
70 , m_oldTextureUnitZeroId(textureUnitZeroId) 72 , m_oldTextureUnitZeroId(textureUnitZeroId)
71 { 73 {
72 m_context->activeTexture(GL_TEXTURE0); 74 m_context->activeTexture(GL_TEXTURE0);
73 } 75 }
74 ~ScopedTextureUnit0BindingRestorer() 76 ~ScopedTextureUnit0BindingRestorer()
75 { 77 {
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) 985 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info)
984 { 986 {
985 if (info->imageId) { 987 if (info->imageId) {
986 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); 988 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId);
987 m_context->destroyImageCHROMIUM(info->imageId); 989 m_context->destroyImageCHROMIUM(info->imageId);
988 info->imageId = 0; 990 info->imageId = 0;
989 } 991 }
990 } 992 }
991 993
992 } // namespace blink 994 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698