| 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 "CCPrioritizedTexture.h" | 7 #include "CCPrioritizedTexture.h" |
| 8 | 8 |
| 9 #include "CCPrioritizedTextureManager.h" | 9 #include "CCPrioritizedTextureManager.h" |
| 10 #include "CCPriorityCalculator.h" | 10 #include "CCPriorityCalculator.h" |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 using namespace std; | 13 using namespace std; |
| 14 | 14 |
| 15 namespace WebCore { | 15 namespace cc { |
| 16 | 16 |
| 17 CCPrioritizedTexture::CCPrioritizedTexture(CCPrioritizedTextureManager* manager,
IntSize size, GC3Denum format) | 17 CCPrioritizedTexture::CCPrioritizedTexture(CCPrioritizedTextureManager* manager,
IntSize size, GC3Denum format) |
| 18 : m_size(size) | 18 : m_size(size) |
| 19 , m_format(format) | 19 , m_format(format) |
| 20 , m_bytes(0) | 20 , m_bytes(0) |
| 21 , m_priority(CCPriorityCalculator::lowestPriority()) | 21 , m_priority(CCPriorityCalculator::lowestPriority()) |
| 22 , m_isAbovePriorityCutoff(false) | 22 , m_isAbovePriorityCutoff(false) |
| 23 , m_isSelfManaged(false) | 23 , m_isSelfManaged(false) |
| 24 , m_backing(0) | 24 , m_backing(0) |
| 25 , m_manager(0) | 25 , m_manager(0) |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 m_backing = 0; | 112 m_backing = 0; |
| 113 } | 113 } |
| 114 | 114 |
| 115 void CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder(size_t bytes) | 115 void CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder(size_t bytes) |
| 116 { | 116 { |
| 117 setDimensions(IntSize(), GraphicsContext3D::RGBA); | 117 setDimensions(IntSize(), GraphicsContext3D::RGBA); |
| 118 setIsSelfManaged(true); | 118 setIsSelfManaged(true); |
| 119 m_bytes = bytes; | 119 m_bytes = bytes; |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace WebCore | 122 } // namespace cc |
| OLD | NEW |