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

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

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 years, 3 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/render_pass_test_common.cc ('k') | cc/trees/layer_tree_host.h » ('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)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 FakeTiledLayerImpl::FakeTiledLayerImpl(LayerTreeImpl* tree_impl, int id) 64 FakeTiledLayerImpl::FakeTiledLayerImpl(LayerTreeImpl* tree_impl, int id)
65 : TiledLayerImpl(tree_impl, id) {} 65 : TiledLayerImpl(tree_impl, id) {}
66 66
67 FakeTiledLayerImpl::~FakeTiledLayerImpl() {} 67 FakeTiledLayerImpl::~FakeTiledLayerImpl() {}
68 68
69 FakeTiledLayer::FakeTiledLayer(PrioritizedResourceManager* resource_manager) 69 FakeTiledLayer::FakeTiledLayer(PrioritizedResourceManager* resource_manager)
70 : TiledLayer(), 70 : TiledLayer(),
71 fake_updater_(make_scoped_refptr(new FakeLayerUpdater)), 71 fake_updater_(make_scoped_refptr(new FakeLayerUpdater)),
72 resource_manager_(resource_manager) { 72 resource_manager_(resource_manager) {
73 SetTileSize(tile_size()); 73 SetTileSize(tile_size());
74 SetTextureFormat(GL_RGBA); 74 SetTextureFormat(RGBA_8888);
75 SetBorderTexelOption(LayerTilingData::NO_BORDER_TEXELS); 75 SetBorderTexelOption(LayerTilingData::NO_BORDER_TEXELS);
76 // So that we don't get false positives if any of these 76 // So that we don't get false positives if any of these
77 // tests expect to return false from DrawsContent() for other reasons. 77 // tests expect to return false from DrawsContent() for other reasons.
78 SetIsDrawable(true); 78 SetIsDrawable(true);
79 } 79 }
80 80
81 FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds( 81 FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds(
82 PrioritizedResourceManager* resource_manager) 82 PrioritizedResourceManager* resource_manager)
83 : FakeTiledLayer(resource_manager) {} 83 : FakeTiledLayer(resource_manager) {}
84 84
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 float* contents_scale_y, 162 float* contents_scale_y,
163 gfx::Size* content_bounds) { 163 gfx::Size* content_bounds) {
164 *contents_scale_x = 164 *contents_scale_x =
165 static_cast<float>(forced_content_bounds_.width()) / bounds().width(); 165 static_cast<float>(forced_content_bounds_.width()) / bounds().width();
166 *contents_scale_y = 166 *contents_scale_y =
167 static_cast<float>(forced_content_bounds_.height()) / bounds().height(); 167 static_cast<float>(forced_content_bounds_.height()) / bounds().height();
168 *content_bounds = forced_content_bounds_; 168 *content_bounds = forced_content_bounds_;
169 } 169 }
170 170
171 } // namespace cc 171 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/render_pass_test_common.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698