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

Unified Diff: cc/CCResourceProvider.cpp

Issue 10961008: cc: Remove TextureUploaderOption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCResourceProvider.h ('k') | cc/CCResourceProviderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCResourceProvider.cpp
diff --git a/cc/CCResourceProvider.cpp b/cc/CCResourceProvider.cpp
index 4c5876938b4f32c0ef7e1e2f69b862a9bc331b9b..beb2fd9603c810d2332b83762300be3f2567850e 100644
--- a/cc/CCResourceProvider.cpp
+++ b/cc/CCResourceProvider.cpp
@@ -9,8 +9,6 @@
#undef LOG
#endif
-#include <limits.h>
-
#include "base/string_split.h"
#include "base/string_util.h"
#include "CCProxy.h"
@@ -19,7 +17,7 @@
#include "IntRect.h"
#include "LayerTextureSubImage.h"
#include "ThrottledTextureUploader.h"
-#include "UnthrottledTextureUploader.h"
+#include <limits>
#include <public/WebGraphicsContext3D.h>
#include <wtf/HashSet.h>
@@ -49,10 +47,10 @@ static bool isTextureFormatSupportedForStorage(GC3Denum format)
return (format == GraphicsContext3D::RGBA || format == Extensions3D::BGRA_EXT);
}
-PassOwnPtr<CCResourceProvider> CCResourceProvider::create(CCGraphicsContext* context, TextureUploaderOption option)
+PassOwnPtr<CCResourceProvider> CCResourceProvider::create(CCGraphicsContext* context)
{
OwnPtr<CCResourceProvider> resourceProvider(adoptPtr(new CCResourceProvider(context)));
- if (!resourceProvider->initialize(option))
+ if (!resourceProvider->initialize())
return nullptr;
return resourceProvider.release();
}
@@ -385,18 +383,15 @@ CCResourceProvider::CCResourceProvider(CCGraphicsContext* context)
, m_useTextureStorageExt(false)
, m_useTextureUsageHint(false)
, m_useShallowFlush(false)
- , m_maxTextureSize(0)
+ , m_maxTextureSize(std::numeric_limits<int>::max())
{
}
-bool CCResourceProvider::initialize(TextureUploaderOption textureUploaderOption)
+bool CCResourceProvider::initialize()
{
ASSERT(CCProxy::isImplThread());
WebGraphicsContext3D* context3d = m_context->context3D();
if (!context3d) {
- m_maxTextureSize = INT_MAX;
- m_textureUploader = UnthrottledTextureUploader::create();
piman 2012/09/20 01:37:01 drive-by: what about the software case (no context
nduca 2012/09/20 03:49:29 It'd be really nice if the uploader talked only to
piman 2012/09/20 04:30:29 My main issue though is that in software mode, we
reveman 2012/09/20 04:52:18 I think you're right. We might still need a textur
-
// FIXME: Implement this path for software compositing.
return false;
}
@@ -424,10 +419,7 @@ bool CCResourceProvider::initialize(TextureUploaderOption textureUploaderOption)
m_texSubImage = adoptPtr(new LayerTextureSubImage(useMapSub));
m_textureCopier = AcceleratedTextureCopier::create(context3d, useBindUniform);
- if (textureUploaderOption == ThrottledUploader)
- m_textureUploader = ThrottledTextureUploader::create(context3d);
- else
- m_textureUploader = UnthrottledTextureUploader::create();
+ m_textureUploader = ThrottledTextureUploader::create(context3d);
GLC(context3d, context3d->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &m_maxTextureSize));
piman 2012/09/20 04:30:29 another thing, IIRC in debug, command buffers like
return true;
}
« no previous file with comments | « cc/CCResourceProvider.h ('k') | cc/CCResourceProviderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698