| 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 "cc/test/tiled_layer_test_common.h" | 5 #include "cc/test/tiled_layer_test_common.h" |
| 6 | 6 |
| 7 using cc::LayerTilingData; | 7 using cc::LayerTilingData; |
| 8 using cc::LayerUpdater; | 8 using cc::LayerUpdater; |
| 9 using cc::PriorityCalculator; | 9 using cc::PriorityCalculator; |
| 10 using cc::PrioritizedResource; | 10 using cc::PrioritizedResource; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 FakeLayerUpdater::Resource::~Resource() | 26 FakeLayerUpdater::Resource::~Resource() |
| 27 { | 27 { |
| 28 } | 28 } |
| 29 | 29 |
| 30 void FakeLayerUpdater::Resource::Update(ResourceUpdateQueue* queue, gfx::Rect so
urceRect, gfx::Vector2d destOffset, bool partialUpdate, RenderingStats* stats) | 30 void FakeLayerUpdater::Resource::Update(ResourceUpdateQueue* queue, gfx::Rect so
urceRect, gfx::Vector2d destOffset, bool partialUpdate, RenderingStats* stats) |
| 31 { | 31 { |
| 32 const gfx::Rect rect(0, 0, 10, 10); | 32 const gfx::Rect rect(0, 0, 10, 10); |
| 33 ResourceUpdate upload = ResourceUpdate::Create( | 33 ResourceUpdate upload = ResourceUpdate::Create( |
| 34 texture(), &m_bitmap, rect, rect, gfx::Vector2d()); | 34 texture(), &m_bitmap, rect, rect, gfx::Vector2d()); |
| 35 if (partialUpdate) | 35 if (partialUpdate) |
| 36 queue->appendPartialUpload(upload); | 36 queue->AppendPartialUpload(upload); |
| 37 else | 37 else |
| 38 queue->appendFullUpload(upload); | 38 queue->AppendFullUpload(upload); |
| 39 | 39 |
| 40 m_layer->update(); | 40 m_layer->update(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 FakeLayerUpdater::FakeLayerUpdater() | 43 FakeLayerUpdater::FakeLayerUpdater() |
| 44 : m_prepareCount(0) | 44 : m_prepareCount(0) |
| 45 , m_updateCount(0) | 45 , m_updateCount(0) |
| 46 { | 46 { |
| 47 } | 47 } |
| 48 | 48 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 float* contents_scale_x, | 161 float* contents_scale_x, |
| 162 float* contents_scale_y, | 162 float* contents_scale_y, |
| 163 gfx::Size* contentBounds) | 163 gfx::Size* contentBounds) |
| 164 { | 164 { |
| 165 *contents_scale_x = static_cast<float>(m_forcedContentBounds.width()) / boun
ds().width(); | 165 *contents_scale_x = static_cast<float>(m_forcedContentBounds.width()) / boun
ds().width(); |
| 166 *contents_scale_y = static_cast<float>(m_forcedContentBounds.height()) / bou
nds().height(); | 166 *contents_scale_y = static_cast<float>(m_forcedContentBounds.height()) / bou
nds().height(); |
| 167 *contentBounds = m_forcedContentBounds; | 167 *contentBounds = m_forcedContentBounds; |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace cc | 170 } // namespace cc |
| OLD | NEW |