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

Side by Side Diff: cc/layers/tiled_layer.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/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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()
88 : ContentsScalingLayer(), 88 : ContentsScalingLayer(),
89 texture_format_(GL_INVALID_ENUM), 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
99 scoped_ptr<LayerImpl> TiledLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { 99 scoped_ptr<LayerImpl> TiledLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 gfx::Rect prepaint_rect = visible_content_rect(); 894 gfx::Rect prepaint_rect = visible_content_rect();
895 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, 895 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns,
896 -tiler_->tile_size().height() * kPrepaintRows); 896 -tiler_->tile_size().height() * kPrepaintRows);
897 gfx::Rect content_rect(content_bounds()); 897 gfx::Rect content_rect(content_bounds());
898 prepaint_rect.Intersect(content_rect); 898 prepaint_rect.Intersect(content_rect);
899 899
900 return prepaint_rect; 900 return prepaint_rect;
901 } 901 }
902 902
903 } // namespace cc 903 } // 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