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

Side by Side Diff: cc/test/tiled_layer_test_common.cc

Issue 12962007: cc: Chromify resource_update_queue (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 9 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 unified diff | Download patch
« no previous file with comments | « cc/test/fake_scrollbar_layer.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/test/fake_scrollbar_layer.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698