summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-10 17:33:47 +0000
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-10 17:33:47 +0000
commit47822431a6a46d9a9cb670f1f50031599dd19d10 (patch)
tree55439bbf000bca1fe1c01d8b84dbdf6b17f6827e /cc
parentce6c00a98b611ea963259a1d929fcba10bfb2eec (diff)
downloadchromium_src-47822431a6a46d9a9cb670f1f50031599dd19d10.zip
chromium_src-47822431a6a46d9a9cb670f1f50031599dd19d10.tar.gz
chromium_src-47822431a6a46d9a9cb670f1f50031599dd19d10.tar.bz2
Remove all traces of compositing reasons from cc
This information is now coming in via the debug info. Lots of stuff may disappear now. BUG=None R=jamesr@chromium.org Review URL: https://codereview.chromium.org/128263006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/cc.gyp1
-rw-r--r--cc/layers/compositing_reasons.h63
-rw-r--r--cc/layers/layer.cc7
-rw-r--r--cc/layers/layer.h4
-rw-r--r--cc/layers/layer_impl.cc145
-rw-r--r--cc/layers/layer_impl.h10
6 files changed, 1 insertions, 229 deletions
diff --git a/cc/cc.gyp b/cc/cc.gyp
index d1d0b0b..8ef6bde 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -129,7 +129,6 @@
'input/top_controls_manager.h',
'input/top_controls_manager_client.h',
'layers/append_quads_data.h',
- 'layers/compositing_reasons.h',
'layers/content_layer.cc',
'layers/content_layer.h',
'layers/content_layer_client.h',
diff --git a/cc/layers/compositing_reasons.h b/cc/layers/compositing_reasons.h
deleted file mode 100644
index 6331a90..0000000
--- a/cc/layers/compositing_reasons.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2013 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.
-
-#ifndef CC_LAYERS_COMPOSITING_REASONS_H_
-#define CC_LAYERS_COMPOSITING_REASONS_H_
-
-#include "base/port.h"
-
-namespace cc {
-
-// This is a clone of CompositingReasons and WebCompositingReasons from Blink.
-const uint64 kCompositingReasonUnknown = 0;
-const uint64 kCompositingReason3DTransform = GG_UINT64_C(1) << 0;
-const uint64 kCompositingReasonVideo = GG_UINT64_C(1) << 1;
-const uint64 kCompositingReasonCanvas = GG_UINT64_C(1) << 2;
-const uint64 kCompositingReasonPlugin = GG_UINT64_C(1) << 3;
-const uint64 kCompositingReasonIFrame = GG_UINT64_C(1) << 4;
-const uint64 kCompositingReasonBackfaceVisibilityHidden = GG_UINT64_C(1) << 5;
-const uint64 kCompositingReasonAnimation = GG_UINT64_C(1) << 6;
-const uint64 kCompositingReasonFilters = GG_UINT64_C(1) << 7;
-const uint64 kCompositingReasonPositionFixed = GG_UINT64_C(1) << 8;
-const uint64 kCompositingReasonPositionSticky = GG_UINT64_C(1) << 9;
-const uint64 kCompositingReasonOverflowScrollingTouch = GG_UINT64_C(1) << 10;
-const uint64 kCompositingReasonAssumedOverlap = GG_UINT64_C(1) << 12;
-const uint64 kCompositingReasonOverlap = GG_UINT64_C(1) << 13;
-const uint64 kCompositingReasonNegativeZIndexChildren = GG_UINT64_C(1) << 14;
-const uint64 kCompositingReasonTransformWithCompositedDescendants =
- GG_UINT64_C(1) << 15;
-const uint64 kCompositingReasonOpacityWithCompositedDescendants =
- GG_UINT64_C(1) << 16;
-const uint64 kCompositingReasonMaskWithCompositedDescendants =
- GG_UINT64_C(1) << 17;
-const uint64 kCompositingReasonReflectionWithCompositedDescendants =
- GG_UINT64_C(1) << 18;
-const uint64 kCompositingReasonFilterWithCompositedDescendants =
- GG_UINT64_C(1) << 19;
-const uint64 kCompositingReasonBlendingWithCompositedDescendants =
- GG_UINT64_C(1) << 20;
-const uint64 kCompositingReasonClipsCompositingDescendants =
- GG_UINT64_C(1) << 21;
-const uint64 kCompositingReasonPerspective = GG_UINT64_C(1) << 22;
-const uint64 kCompositingReasonPreserve3D = GG_UINT64_C(1) << 23;
-const uint64 kCompositingReasonReflectionOfCompositedParent =
- GG_UINT64_C(1) << 24;
-const uint64 kCompositingReasonRoot = GG_UINT64_C(1) << 25;
-const uint64 kCompositingReasonLayerForClip = GG_UINT64_C(1) << 26;
-const uint64 kCompositingReasonLayerForScrollbar = GG_UINT64_C(1) << 27;
-const uint64 kCompositingReasonLayerForScrollingContainer =
- GG_UINT64_C(1) << 28;
-const uint64 kCompositingReasonLayerForForeground = GG_UINT64_C(1) << 29;
-const uint64 kCompositingReasonLayerForBackground = GG_UINT64_C(1) << 30;
-const uint64 kCompositingReasonLayerForMask = GG_UINT64_C(1) << 31;
-const uint64 kCompositingReasonOverflowScrollingParent = GG_UINT64_C(1) << 32;
-const uint64 kCompositingReasonOutOfFlowClipping = GG_UINT64_C(1) << 33;
-const uint64 kCompositingReasonIsolateCompositedDescendants =
- GG_UINT64_C(1) << 35;
-
-typedef uint64 CompositingReasons;
-
-} // namespace cc
-
-#endif // CC_LAYERS_COMPOSITING_REASONS_H_
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index f7682fd..7110dc7 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -57,7 +57,6 @@ Layer::Layer()
force_render_surface_(false),
anchor_point_(0.5f, 0.5f),
background_color_(0),
- compositing_reasons_(kCompositingReasonUnknown),
opacity_(1.f),
blend_mode_(SkXfermode::kSrcOver_Mode),
anchor_point_z_(0.f),
@@ -883,7 +882,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetDebugName(std::string());
}
- layer->SetCompositingReasons(compositing_reasons_);
layer->SetDoubleSided(double_sided_);
layer->SetDrawCheckerboardForMissingTiles(
draw_checkerboard_for_missing_tiles_);
@@ -1046,11 +1044,6 @@ scoped_refptr<base::debug::ConvertableToTraceFormat> Layer::TakeDebugInfo() {
return NULL;
}
-
-void Layer::SetCompositingReasons(CompositingReasons reasons) {
- compositing_reasons_ = reasons;
-}
-
void Layer::CreateRenderSurface() {
DCHECK(!draw_properties_.render_surface);
draw_properties_.render_surface = make_scoped_ptr(new RenderSurface(this));
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index f0bca17..46b3233 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -18,7 +18,6 @@
#include "cc/base/region.h"
#include "cc/base/scoped_ptr_vector.h"
#include "cc/debug/micro_benchmark.h"
-#include "cc/layers/compositing_reasons.h"
#include "cc/layers/draw_properties.h"
#include "cc/layers/layer_lists.h"
#include "cc/layers/layer_position_constraint.h"
@@ -368,8 +367,6 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
void SetLayerClient(LayerClient* client) { client_ = client; }
- void SetCompositingReasons(CompositingReasons reasons);
-
virtual void PushPropertiesTo(LayerImpl* layer);
void CreateRenderSurface();
@@ -594,7 +591,6 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
gfx::PointF position_;
gfx::PointF anchor_point_;
SkColor background_color_;
- CompositingReasons compositing_reasons_;
float opacity_;
SkXfermode::Mode blend_mode_;
FilterOperations filters_;
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index f0731d4..74a9b84 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -63,7 +63,6 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
opacity_(1.0),
blend_mode_(SkXfermode::kSrcOver_Mode),
draw_depth_(0.f),
- compositing_reasons_(kCompositingReasonUnknown),
current_draw_mode_(DRAW_MODE_NONE),
horizontal_scrollbar_layer_(NULL),
vertical_scrollbar_layer_(NULL) {
@@ -505,7 +504,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetContentBounds(content_bounds());
layer->SetContentsScale(contents_scale_x(), contents_scale_y());
layer->SetDebugName(debug_name_);
- layer->SetCompositingReasons(compositing_reasons_);
layer->SetDoubleSided(double_sided_);
layer->SetDrawCheckerboardForMissingTiles(
draw_checkerboard_for_missing_tiles_);
@@ -1193,132 +1191,6 @@ void LayerImpl::SetVerticalScrollbarLayer(
vertical_scrollbar_layer_->set_scroll_layer_id(id());
}
-static scoped_ptr<base::Value>
-CompositingReasonsAsValue(CompositingReasons reasons) {
- scoped_ptr<base::ListValue> reason_list(new base::ListValue());
-
- if (reasons == kCompositingReasonUnknown) {
- reason_list->AppendString("No reasons given");
- return reason_list.PassAs<base::Value>();
- }
-
- if (reasons & kCompositingReason3DTransform)
- reason_list->AppendString("Has a 3d Transform");
-
- if (reasons & kCompositingReasonVideo)
- reason_list->AppendString("Is accelerated video");
-
- if (reasons & kCompositingReasonCanvas)
- reason_list->AppendString("Is accelerated canvas");
-
- if (reasons & kCompositingReasonPlugin)
- reason_list->AppendString("Is accelerated plugin");
-
- if (reasons & kCompositingReasonIFrame)
- reason_list->AppendString("Is accelerated iframe");
-
- if (reasons & kCompositingReasonBackfaceVisibilityHidden)
- reason_list->AppendString("Has backface-visibility: hidden");
-
- if (reasons & kCompositingReasonAnimation)
- reason_list->AppendString("Has accelerated animation or transition");
-
- if (reasons & kCompositingReasonFilters)
- reason_list->AppendString("Has accelerated filters");
-
- if (reasons & kCompositingReasonPositionFixed)
- reason_list->AppendString("Is fixed position");
-
- if (reasons & kCompositingReasonPositionSticky)
- reason_list->AppendString("Is sticky position");
-
- if (reasons & kCompositingReasonOverflowScrollingTouch)
- reason_list->AppendString("Is a scrollable overflow element");
-
- if (reasons & kCompositingReasonAssumedOverlap)
- reason_list->AppendString("Might overlap a composited animation");
-
- if (reasons & kCompositingReasonOverlap)
- reason_list->AppendString("Overlaps other composited content");
-
- if (reasons & kCompositingReasonNegativeZIndexChildren) {
- reason_list->AppendString("Might overlap negative z-index "
- "composited content");
- }
-
- if (reasons & kCompositingReasonTransformWithCompositedDescendants) {
- reason_list->AppendString("Has transform needed by a "
- "composited descendant");
- }
-
- if (reasons & kCompositingReasonOpacityWithCompositedDescendants)
- reason_list->AppendString("Has opacity needed by a composited descendant");
-
- if (reasons & kCompositingReasonMaskWithCompositedDescendants)
- reason_list->AppendString("Has a mask needed by a composited descendant");
-
- if (reasons & kCompositingReasonReflectionWithCompositedDescendants)
- reason_list->AppendString("Has a reflection with a composited descendant");
-
- if (reasons & kCompositingReasonFilterWithCompositedDescendants)
- reason_list->AppendString("Has filter effect with a composited descendant");
-
- if (reasons & kCompositingReasonBlendingWithCompositedDescendants)
- reason_list->AppendString("Has a blend mode with a composited descendant");
-
- if (reasons & kCompositingReasonClipsCompositingDescendants)
- reason_list->AppendString("Clips a composited descendant");
-
- if (reasons & kCompositingReasonPerspective) {
- reason_list->AppendString("Has a perspective transform needed by a "
- "composited 3d descendant");
- }
-
- if (reasons & kCompositingReasonPreserve3D) {
- reason_list->AppendString("Has preserves-3d style with composited "
- "3d descendant");
- }
-
- if (reasons & kCompositingReasonReflectionOfCompositedParent)
- reason_list->AppendString("Is the reflection of a composited layer");
-
- if (reasons & kCompositingReasonRoot)
- reason_list->AppendString("Is the root");
-
- if (reasons & kCompositingReasonLayerForClip)
- reason_list->AppendString("Convenience layer, to clip subtree");
-
- if (reasons & kCompositingReasonLayerForScrollbar)
- reason_list->AppendString("Convenience layer for rendering scrollbar");
-
- if (reasons & kCompositingReasonLayerForScrollingContainer)
- reason_list->AppendString("Convenience layer, the scrolling container");
-
- if (reasons & kCompositingReasonLayerForForeground) {
- reason_list->AppendString("Convenience layer, foreground when main layer "
- "has negative z-index composited content");
- }
-
- if (reasons & kCompositingReasonLayerForBackground) {
- reason_list->AppendString("Convenience layer, background when main layer "
- "has a composited background");
- }
-
- if (reasons & kCompositingReasonLayerForMask)
- reason_list->AppendString("Is a mask layer");
-
- if (reasons & kCompositingReasonOverflowScrollingParent)
- reason_list->AppendString("Scroll parent is not an ancestor");
-
- if (reasons & kCompositingReasonOutOfFlowClipping)
- reason_list->AppendString("Has clipping ancestor");
-
- if (reasons & kCompositingReasonIsolateCompositedDescendants)
- reason_list->AppendString("Should isolate composited descendants");
-
- return reason_list.PassAs<base::Value>();
-}
-
void LayerImpl::AsValueInto(base::DictionaryValue* state) const {
TracedValue::MakeDictIntoImplicitSnapshot(state, LayerTypeAsString(), this);
state->SetInteger("layer_id", id());
@@ -1326,8 +1198,6 @@ void LayerImpl::AsValueInto(base::DictionaryValue* state) const {
state->Set("bounds", MathUtil::AsValue(bounds()).release());
state->SetInteger("draws_content", DrawsContent());
state->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes());
- state->Set("compositing_reasons",
- CompositingReasonsAsValue(compositing_reasons_).release());
bool clipped;
gfx::QuadF layer_quad = MathUtil::MapQuad(
@@ -1383,20 +1253,7 @@ void LayerImpl::AsValueInto(base::DictionaryValue* state) const {
base::JSONReader json_reader;
scoped_ptr<base::Value> debug_info_value(json_reader.ReadToValue(str));
- // TODO(vollick): The TYPE_LIST code below is brittle; it assumes the only
- // debug info is the layout rects. In future, this will be generalized, and
- // debug info will return a dictionary to be merged into state. Until then,
- // we unfortunately have to support both situations. Once we've migrated,
- // the TYPE_LIST branch will be deleted.
- if (debug_info_value->IsType(base::Value::TYPE_LIST)) {
- // Parsing the JSON and re-encoding it is not very efficient,
- // but it's the simplest way to achieve the desired effect, which
- // is to output:
- // {..., layout_rects: [{geometry_rect: ...}, ...], ...}
- // rather than:
- // {layout_rects: "[{geometry_rect: ...}, ...]", ...}
- state->Set("layout_rects", debug_info_value.release());
- } else if (debug_info_value->IsType(base::Value::TYPE_DICTIONARY)) {
+ if (debug_info_value->IsType(base::Value::TYPE_DICTIONARY)) {
base::DictionaryValue* dictionary_value = NULL;
bool converted_to_dictionary =
debug_info_value->GetAsDictionary(&dictionary_value);
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index cfbd353..d124457 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -18,7 +18,6 @@
#include "cc/base/region.h"
#include "cc/base/scoped_ptr_vector.h"
#include "cc/input/input_handler.h"
-#include "cc/layers/compositing_reasons.h"
#include "cc/layers/draw_properties.h"
#include "cc/layers/layer_lists.h"
#include "cc/layers/layer_position_constraint.h"
@@ -277,14 +276,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
void SetDebugName(const std::string& debug_name) { debug_name_ = debug_name; }
std::string debug_name() const { return debug_name_; }
- void SetCompositingReasons(CompositingReasons reasons) {
- compositing_reasons_ = reasons;
- }
-
- CompositingReasons compositing_reasons() const {
- return compositing_reasons_;
- }
-
bool ShowDebugBorders() const;
// These invalidate the host's render surface layer list. The caller
@@ -632,7 +623,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
// Debug layer name.
std::string debug_name_;
- CompositingReasons compositing_reasons_;
FilterOperations filters_;
FilterOperations background_filters_;