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

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

Issue 197883017: SkColorType instead of (deprecated) SkBitmap::Config (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments from #5 Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/skia_common.cc ('k') | cc/trees/layer_tree_host_impl_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 namespace cc { 7 namespace cc {
8 8
9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, 9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer,
10 scoped_ptr<PrioritizedResource> texture) 10 scoped_ptr<PrioritizedResource> texture)
11 : LayerUpdater::Resource(texture.Pass()), layer_(layer) { 11 : LayerUpdater::Resource(texture.Pass()), layer_(layer) {
12 bitmap_.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); 12 bitmap_.allocN32Pixels(10, 10);
13 bitmap_.allocPixels();
14 } 13 }
15 14
16 FakeLayerUpdater::Resource::~Resource() {} 15 FakeLayerUpdater::Resource::~Resource() {}
17 16
18 void FakeLayerUpdater::Resource::Update(ResourceUpdateQueue* queue, 17 void FakeLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
19 const gfx::Rect& source_rect, 18 const gfx::Rect& source_rect,
20 const gfx::Vector2d& dest_offset, 19 const gfx::Vector2d& dest_offset,
21 bool partial_update) { 20 bool partial_update) {
22 const gfx::Rect kRect(0, 0, 10, 10); 21 const gfx::Rect kRect(0, 0, 10, 10);
23 ResourceUpdate upload = ResourceUpdate::Create( 22 ResourceUpdate upload = ResourceUpdate::Create(
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 float* contents_scale_y, 161 float* contents_scale_y,
163 gfx::Size* content_bounds) { 162 gfx::Size* content_bounds) {
164 *contents_scale_x = 163 *contents_scale_x =
165 static_cast<float>(forced_content_bounds_.width()) / bounds().width(); 164 static_cast<float>(forced_content_bounds_.width()) / bounds().width();
166 *contents_scale_y = 165 *contents_scale_y =
167 static_cast<float>(forced_content_bounds_.height()) / bounds().height(); 166 static_cast<float>(forced_content_bounds_.height()) / bounds().height();
168 *content_bounds = forced_content_bounds_; 167 *content_bounds = forced_content_bounds_;
169 } 168 }
170 169
171 } // namespace cc 170 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/skia_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698