| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "public/platform/WebExternalBitmap.h" | 42 #include "public/platform/WebExternalBitmap.h" |
| 43 #include "public/platform/WebExternalTextureLayer.h" | 43 #include "public/platform/WebExternalTextureLayer.h" |
| 44 #include "public/platform/WebGraphicsContext3D.h" | 44 #include "public/platform/WebGraphicsContext3D.h" |
| 45 #include "public/platform/WebGraphicsContext3DProvider.h" | 45 #include "public/platform/WebGraphicsContext3DProvider.h" |
| 46 #ifndef NDEBUG | 46 #ifndef NDEBUG |
| 47 #include "wtf/RefCountedLeakCounter.h" | 47 #include "wtf/RefCountedLeakCounter.h" |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 using namespace std; | 50 using namespace std; |
| 51 | 51 |
| 52 namespace WebCore { | 52 namespace blink { |
| 53 | 53 |
| 54 namespace { | 54 namespace { |
| 55 // Global resource ceiling (expressed in terms of pixels) for DrawingBuffer crea
tion and resize. | 55 // Global resource ceiling (expressed in terms of pixels) for DrawingBuffer crea
tion and resize. |
| 56 // When this limit is set, DrawingBuffer::create() and DrawingBuffer::reset() ca
lls that would | 56 // When this limit is set, DrawingBuffer::create() and DrawingBuffer::reset() ca
lls that would |
| 57 // exceed the global cap will instead clear the buffer. | 57 // exceed the global cap will instead clear the buffer. |
| 58 const int s_maximumResourceUsePixels = 16 * 1024 * 1024; | 58 const int s_maximumResourceUsePixels = 16 * 1024 * 1024; |
| 59 int s_currentResourceUsePixels = 0; | 59 int s_currentResourceUsePixels = 0; |
| 60 const float s_resourceAdjustedRatio = 0.5; | 60 const float s_resourceAdjustedRatio = 0.5; |
| 61 | 61 |
| 62 const bool s_allowContextEvictionOnCreate = true; | 62 const bool s_allowContextEvictionOnCreate = true; |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 | 1062 |
| 1063 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) | 1063 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) |
| 1064 { | 1064 { |
| 1065 if (info->imageId) { | 1065 if (info->imageId) { |
| 1066 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); | 1066 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); |
| 1067 m_context->destroyImageCHROMIUM(info->imageId); | 1067 m_context->destroyImageCHROMIUM(info->imageId); |
| 1068 info->imageId = 0; | 1068 info->imageId = 0; |
| 1069 } | 1069 } |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 } // namespace WebCore | 1072 } // namespace blink |
| OLD | NEW |