Chromium Code Reviews| 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; |
| } |