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

Side by Side Diff: cc/solid_color_layer_impl.cc

Issue 11275113: Remove most remaining references to IntRect and FloatRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compositor bindings Created 8 years, 1 month 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/scrollbar_layer_impl.cc ('k') | cc/solid_color_layer_impl_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 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/solid_color_layer_impl.h" 7 #include "cc/solid_color_layer_impl.h"
8 8
9 #include "cc/quad_sink.h" 9 #include "cc/quad_sink.h"
10 #include "cc/solid_color_draw_quad.h" 10 #include "cc/solid_color_draw_quad.h"
(...skipping 16 matching lines...) Expand all
27 { 27 {
28 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState()); 28 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState());
29 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); 29 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData);
30 30
31 // We create a series of smaller quads instead of just one large one so that the 31 // We create a series of smaller quads instead of just one large one so that the
32 // culler can reduce the total pixels drawn. 32 // culler can reduce the total pixels drawn.
33 int width = contentBounds().width(); 33 int width = contentBounds().width();
34 int height = contentBounds().height(); 34 int height = contentBounds().height();
35 for (int x = 0; x < width; x += m_tileSize) { 35 for (int x = 0; x < width; x += m_tileSize) {
36 for (int y = 0; y < height; y += m_tileSize) { 36 for (int y = 0; y < height; y += m_tileSize) {
37 IntRect solidTileRect(x, y, std::min(width - x, m_tileSize), std::mi n(height - y, m_tileSize)); 37 gfx::Rect solidTileRect(x, y, std::min(width - x, m_tileSize), std:: min(height - y, m_tileSize));
38 quadSink.append(SolidColorDrawQuad::create(sharedQuadState, solidTil eRect, backgroundColor()).PassAs<DrawQuad>(), appendQuadsData); 38 quadSink.append(SolidColorDrawQuad::create(sharedQuadState, solidTil eRect, backgroundColor()).PassAs<DrawQuad>(), appendQuadsData);
39 } 39 }
40 } 40 }
41 } 41 }
42 42
43 const char* SolidColorLayerImpl::layerTypeAsString() const 43 const char* SolidColorLayerImpl::layerTypeAsString() const
44 { 44 {
45 return "SolidColorLayer"; 45 return "SolidColorLayer";
46 } 46 }
47 47
48 } // namespace cc 48 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scrollbar_layer_impl.cc ('k') | cc/solid_color_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698