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

Side by Side Diff: cc/test/fake_scoped_ui_resource.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/resources/ui_resource_bitmap.cc ('k') | cc/test/layer_tree_json_parser.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fake_scoped_ui_resource.h" 5 #include "cc/test/fake_scoped_ui_resource.h"
6 6
7 #include "cc/trees/layer_tree_host.h" 7 #include "cc/trees/layer_tree_host.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 namespace { 11 namespace {
12 12
13 UIResourceBitmap CreateMockUIResourceBitmap() { 13 UIResourceBitmap CreateMockUIResourceBitmap() {
14 SkBitmap skbitmap; 14 bool is_opaque = false;
15 skbitmap.setConfig(SkBitmap::kARGB_8888_Config, 1, 1); 15 return UIResourceBitmap(gfx::Size(1, 1), is_opaque);
16 skbitmap.allocPixels();
17 skbitmap.setImmutable();
18 return UIResourceBitmap(skbitmap);
19 } 16 }
20 17
21 } // anonymous namespace 18 } // anonymous namespace
22 19
23 scoped_ptr<FakeScopedUIResource> FakeScopedUIResource::Create( 20 scoped_ptr<FakeScopedUIResource> FakeScopedUIResource::Create(
24 LayerTreeHost* host) { 21 LayerTreeHost* host) {
25 return make_scoped_ptr(new FakeScopedUIResource(host)); 22 return make_scoped_ptr(new FakeScopedUIResource(host));
26 } 23 }
27 24
28 FakeScopedUIResource::FakeScopedUIResource(LayerTreeHost* host) 25 FakeScopedUIResource::FakeScopedUIResource(LayerTreeHost* host)
(...skipping 12 matching lines...) Expand all
41 lost_resource_count++; 38 lost_resource_count++;
42 return ScopedUIResource::GetBitmap(uid, resource_lost); 39 return ScopedUIResource::GetBitmap(uid, resource_lost);
43 } 40 }
44 41
45 void FakeScopedUIResource::ResetCounters() { 42 void FakeScopedUIResource::ResetCounters() {
46 resource_create_count = 0; 43 resource_create_count = 0;
47 lost_resource_count = 0; 44 lost_resource_count = 0;
48 } 45 }
49 46
50 } // namespace cc 47 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_bitmap.cc ('k') | cc/test/layer_tree_json_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698