| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCResourceProvider.h" | 7 #include "CCResourceProvider.h" |
| 8 #ifdef LOG | 8 #ifdef LOG |
| 9 #undef LOG | 9 #undef LOG |
| 10 #endif | 10 #endif |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 , m_useShallowFlush(false) | 445 , m_useShallowFlush(false) |
| 446 , m_maxTextureSize(0) | 446 , m_maxTextureSize(0) |
| 447 { | 447 { |
| 448 } | 448 } |
| 449 | 449 |
| 450 bool CCResourceProvider::initialize() | 450 bool CCResourceProvider::initialize() |
| 451 { | 451 { |
| 452 ASSERT(CCProxy::isImplThread()); | 452 ASSERT(CCProxy::isImplThread()); |
| 453 WebGraphicsContext3D* context3d = m_context->context3D(); | 453 WebGraphicsContext3D* context3d = m_context->context3D(); |
| 454 if (!context3d) { | 454 if (!context3d) { |
| 455 m_maxTextureSize = INT_MAX; | 455 m_maxTextureSize = INT_MAX / 2; |
| 456 m_textureUploader = UnthrottledTextureUploader::create(); | 456 m_textureUploader = UnthrottledTextureUploader::create(); |
| 457 | 457 return true; |
| 458 // FIXME: Implement this path for software compositing. | |
| 459 return false; | |
| 460 } | 458 } |
| 461 if (!context3d->makeContextCurrent()) | 459 if (!context3d->makeContextCurrent()) |
| 462 return false; | 460 return false; |
| 463 | 461 |
| 464 std::string extensionsString = UTF16ToASCII(context3d->getString(GraphicsCon
text3D::EXTENSIONS)); | 462 std::string extensionsString = UTF16ToASCII(context3d->getString(GraphicsCon
text3D::EXTENSIONS)); |
| 465 std::vector<std::string> extensions; | 463 std::vector<std::string> extensions; |
| 466 base::SplitString(extensionsString, ' ', &extensions); | 464 base::SplitString(extensionsString, ' ', &extensions); |
| 467 bool useMapSub = false; | 465 bool useMapSub = false; |
| 468 bool useBindUniform = false; | 466 bool useBindUniform = false; |
| 469 for (size_t i = 0; i < extensions.size(); ++i) { | 467 for (size_t i = 0; i < extensions.size(); ++i) { |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 if (childPoolSet.contains(it->second.pool)) | 696 if (childPoolSet.contains(it->second.pool)) |
| 699 #endif | 697 #endif |
| 700 ++maxMailboxCount; | 698 ++maxMailboxCount; |
| 701 } | 699 } |
| 702 } | 700 } |
| 703 while (m_mailboxes.size() > maxMailboxCount) | 701 while (m_mailboxes.size() > maxMailboxCount) |
| 704 m_mailboxes.removeFirst(); | 702 m_mailboxes.removeFirst(); |
| 705 } | 703 } |
| 706 | 704 |
| 707 } | 705 } |
| OLD | NEW |