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

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

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.h ('k') | Source/platform/graphics/gpu/DrawingBufferTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698