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

Unified Diff: cc/layers/surface_layer_impl.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/layers/surface_layer_impl.h ('k') | cc/layers/surface_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_impl.cc
diff --git a/cc/layers/surface_layer_impl.cc b/cc/layers/surface_layer_impl.cc
deleted file mode 100644
index 966112d7f546c1147471fdaf4f68d93fe395cc80..0000000000000000000000000000000000000000
--- a/cc/layers/surface_layer_impl.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2014 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/layers/surface_layer_impl.h"
-
-#include "base/trace_event/trace_event_argument.h"
-#include "cc/debug/debug_colors.h"
-#include "cc/quads/surface_draw_quad.h"
-#include "cc/trees/occlusion.h"
-
-namespace cc {
-
-SurfaceLayerImpl::SurfaceLayerImpl(LayerTreeImpl* tree_impl, int id)
- : LayerImpl(tree_impl, id) {
-}
-
-SurfaceLayerImpl::~SurfaceLayerImpl() {}
-
-scoped_ptr<LayerImpl> SurfaceLayerImpl::CreateLayerImpl(
- LayerTreeImpl* tree_impl) {
- return SurfaceLayerImpl::Create(tree_impl, id());
-}
-
-void SurfaceLayerImpl::SetSurfaceId(SurfaceId surface_id) {
- if (surface_id_ == surface_id)
- return;
-
- surface_id_ = surface_id;
- NoteLayerPropertyChanged();
-}
-
-void SurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) {
- LayerImpl::PushPropertiesTo(layer);
- SurfaceLayerImpl* layer_impl = static_cast<SurfaceLayerImpl*>(layer);
-
- layer_impl->SetSurfaceId(surface_id_);
-}
-
-void SurfaceLayerImpl::AppendQuads(RenderPass* render_pass,
- AppendQuadsData* append_quads_data) {
- SharedQuadState* shared_quad_state =
- render_pass->CreateAndAppendSharedQuadState();
- PopulateSharedQuadState(shared_quad_state);
-
- AppendDebugBorderQuad(
- render_pass, content_bounds(), shared_quad_state, append_quads_data);
-
- if (surface_id_.is_null())
- return;
-
- gfx::Rect quad_rect(content_bounds());
- gfx::Rect visible_quad_rect =
- draw_properties().occlusion_in_content_space.GetUnoccludedContentRect(
- quad_rect);
- if (visible_quad_rect.IsEmpty())
- return;
- SurfaceDrawQuad* quad =
- render_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
- quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, surface_id_);
-}
-
-void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color,
- float* width) const {
- *color = DebugColors::SurfaceLayerBorderColor();
- *width = DebugColors::SurfaceLayerBorderWidth(layer_tree_impl());
-}
-
-void SurfaceLayerImpl::AsValueInto(base::trace_event::TracedValue* dict) const {
- LayerImpl::AsValueInto(dict);
- dict->SetInteger("surface_id", surface_id_.id);
-}
-
-const char* SurfaceLayerImpl::LayerTypeAsString() const {
- return "cc::SurfaceLayerImpl";
-}
-
-} // namespace cc
« no previous file with comments | « cc/layers/surface_layer_impl.h ('k') | cc/layers/surface_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698