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

Side by Side Diff: cc/layers/tiled_layer.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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/layers/tiled_layer.h ('k') | cc/layers/tiled_layer_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layers/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 : partial_update(false), 77 : partial_update(false),
78 valid_for_frame(false), 78 valid_for_frame(false),
79 occluded(false), 79 occluded(false),
80 updater_resource_(updater_resource.Pass()) {} 80 updater_resource_(updater_resource.Pass()) {}
81 81
82 scoped_ptr<LayerUpdater::Resource> updater_resource_; 82 scoped_ptr<LayerUpdater::Resource> updater_resource_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(UpdatableTile); 84 DISALLOW_COPY_AND_ASSIGN(UpdatableTile);
85 }; 85 };
86 86
87 TiledLayer::TiledLayer() 87 TiledLayer::TiledLayer(const LayerSettings& settings)
88 : ContentsScalingLayer(), 88 : ContentsScalingLayer(settings),
89 texture_format_(RGBA_8888), 89 texture_format_(RGBA_8888),
90 skips_draw_(false), 90 skips_draw_(false),
91 failed_update_(false), 91 failed_update_(false),
92 tiling_option_(AUTO_TILE) { 92 tiling_option_(AUTO_TILE) {
93 tiler_ = 93 tiler_ =
94 LayerTilingData::Create(gfx::Size(), LayerTilingData::HAS_BORDER_TEXELS); 94 LayerTilingData::Create(gfx::Size(), LayerTilingData::HAS_BORDER_TEXELS);
95 } 95 }
96 96
97 TiledLayer::~TiledLayer() {} 97 TiledLayer::~TiledLayer() {}
98 98
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 gfx::Rect prepaint_rect = visible_content_rect(); 860 gfx::Rect prepaint_rect = visible_content_rect();
861 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, 861 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns,
862 -tiler_->tile_size().height() * kPrepaintRows); 862 -tiler_->tile_size().height() * kPrepaintRows);
863 gfx::Rect content_rect(content_bounds()); 863 gfx::Rect content_rect(content_bounds());
864 prepaint_rect.Intersect(content_rect); 864 prepaint_rect.Intersect(content_rect);
865 865
866 return prepaint_rect; 866 return prepaint_rect;
867 } 867 }
868 868
869 } // namespace cc 869 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer.h ('k') | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698