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

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

Issue 12676029: cc: Fix capitalization style in chromified files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/layers/tiled_layer_impl_unittest.cc ('k') | cc/layers/video_layer_impl.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 "cc/debug/overdraw_metrics.h" 7 #include "cc/debug/overdraw_metrics.h"
8 #include "cc/resources/bitmap_content_layer_updater.h" 8 #include "cc/resources/bitmap_content_layer_updater.h"
9 #include "cc/resources/layer_painter.h" 9 #include "cc/resources/layer_painter.h"
10 #include "cc/resources/prioritized_resource_manager.h" 10 #include "cc/resources/prioritized_resource_manager.h"
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 scoped_refptr<FakeTiledLayerWithScaledBounds> layer = make_scoped_refptr( 756 scoped_refptr<FakeTiledLayerWithScaledBounds> layer = make_scoped_refptr(
757 new FakeTiledLayerWithScaledBounds(resource_manager_.get())); 757 new FakeTiledLayerWithScaledBounds(resource_manager_.get()));
758 758
759 gfx::Rect layer_bounds(0, 0, 300, 200); 759 gfx::Rect layer_bounds(0, 0, 300, 200);
760 gfx::Rect content_bounds(0, 0, 200, 250); 760 gfx::Rect content_bounds(0, 0, 200, 250);
761 761
762 layer->SetBounds(layer_bounds.size()); 762 layer->SetBounds(layer_bounds.size());
763 layer->SetContentBounds(content_bounds.size()); 763 layer->SetContentBounds(content_bounds.size());
764 layer->draw_properties().visible_content_rect = content_bounds; 764 layer->draw_properties().visible_content_rect = content_bounds;
765 765
766 // On first update, the updateRect includes all tiles, even beyond the 766 // On first update, the update_rect includes all tiles, even beyond the
767 // boundaries of the layer. 767 // boundaries of the layer.
768 // However, it should still be in layer space, not content space. 768 // However, it should still be in layer space, not content space.
769 layer->InvalidateContentRect(content_bounds); 769 layer->InvalidateContentRect(content_bounds);
770 770
771 layer->SetTexturePriorities(priority_calculator_); 771 layer->SetTexturePriorities(priority_calculator_);
772 resource_manager_->PrioritizeTextures(); 772 resource_manager_->PrioritizeTextures();
773 layer->Update(queue_.get(), 0, NULL); 773 layer->Update(queue_.get(), 0, NULL);
774 EXPECT_FLOAT_RECT_EQ(gfx::RectF(0, 0, 300, 300 * 0.8), layer->update_rect()); 774 EXPECT_FLOAT_RECT_EQ(gfx::RectF(0, 0, 300, 300 * 0.8), layer->update_rect());
775 UpdateTextures(); 775 UpdateTextures();
776 776
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 // Invalidate the entire layer in layer space. When painting, the rect given 1794 // Invalidate the entire layer in layer space. When painting, the rect given
1795 // to webkit should match the layer's bounds. 1795 // to webkit should match the layer's bounds.
1796 layer->SetNeedsDisplayRect(layer_rect); 1796 layer->SetNeedsDisplayRect(layer_rect);
1797 layer->Update(queue_.get(), 0, NULL); 1797 layer->Update(queue_.get(), 0, NULL);
1798 1798
1799 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); 1799 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
1800 } 1800 }
1801 1801
1802 } // namespace 1802 } // namespace
1803 } // namespace cc 1803 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_impl_unittest.cc ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698