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

Unified Diff: cc/solid_color_layer_impl.cc

Issue 12603013: Part 10 of cc/ directory shuffles: layers (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/solid_color_layer_impl.h ('k') | cc/solid_color_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/solid_color_layer_impl.cc
diff --git a/cc/solid_color_layer_impl.cc b/cc/solid_color_layer_impl.cc
deleted file mode 100644
index 62e02818208ff1cf742b97f9db1858cee2d85630..0000000000000000000000000000000000000000
--- a/cc/solid_color_layer_impl.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/solid_color_layer_impl.h"
-
-#include "cc/quad_sink.h"
-#include "cc/quads/solid_color_draw_quad.h"
-
-namespace cc {
-
-SolidColorLayerImpl::SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id)
- : LayerImpl(tree_impl, id),
- tile_size_(256) {}
-
-SolidColorLayerImpl::~SolidColorLayerImpl() {}
-
-scoped_ptr<LayerImpl> SolidColorLayerImpl::CreateLayerImpl(
- LayerTreeImpl* tree_impl) {
- return SolidColorLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
-}
-
-void SolidColorLayerImpl::AppendQuads(QuadSink* quad_sink,
- AppendQuadsData* append_quads_data) {
- SharedQuadState* shared_quad_state =
- quad_sink->UseSharedQuadState(CreateSharedQuadState());
- AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
-
- // We create a series of smaller quads instead of just one large one so that
- // the culler can reduce the total pixels drawn.
- int width = content_bounds().width();
- int height = content_bounds().height();
- for (int x = 0; x < width; x += tile_size_) {
- for (int y = 0; y < height; y += tile_size_) {
- gfx::Rect solidTileRect(x,
- y,
- std::min(width - x, tile_size_),
- std::min(height - y, tile_size_));
- scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
- quad->SetNew(shared_quad_state, solidTileRect, background_color());
- quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
- }
- }
-}
-
-const char* SolidColorLayerImpl::LayerTypeAsString() const {
- return "SolidColorLayer";
-}
-
-} // namespace cc
« no previous file with comments | « cc/solid_color_layer_impl.h ('k') | cc/solid_color_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698