Skip to content

Commit

Permalink
viz: cc/surfaces => components/viz/service/surfaces
Browse files Browse the repository at this point in the history
This CL moves the rest of cc/surfaces to components/viz/service/surfaces.

Test helpers for surfaces move to components/viz/test.

The rest of this CL is a mechanical update of includes, namespaces and forward declarations.

Bug: 722935
TBR: tsepez@chromium.org, reveman@chromium.org
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I2a05631c64ab7bbc1123af4da9a31eb50fb9b4b9
Reviewed-on: https://chromium-review.googlesource.com/581860
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: weiliangc <weiliangc@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489057}
  • Loading branch information
Fady Samuel authored and Commit Bot committed Jul 24, 2017
1 parent cac5e0c commit e478607
Show file tree
Hide file tree
Showing 125 changed files with 1,155 additions and 1,370 deletions.
1 change: 0 additions & 1 deletion android_webview/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ source_set("common") {
"//android_webview/common:version",
"//base",
"//base/third_party/dynamic_annotations:dynamic_annotations",
"//cc/surfaces",
"//components/autofill/android:provider",
"//components/autofill/content/browser",
"//components/autofill/content/renderer",
Expand Down
1 change: 1 addition & 0 deletions android_webview/browser/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ include_rules = [
"+components/viz/common",
"+components/viz/service/display",
"+components/viz/service/frame_sinks",
"+components/viz/test",
"+components/webdata/common",

"+content/public/browser",
Expand Down
4 changes: 2 additions & 2 deletions android_webview/browser/test/rendering_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_task_runner_handle.h"
#include "cc/output/compositor_frame.h"
#include "cc/test/compositor_frame_helpers.h"
#include "components/viz/test/compositor_frame_helpers.h"
#include "content/public/browser/android/synchronous_compositor.h"
#include "content/public/test/test_synchronous_compositor_android.h"

Expand Down Expand Up @@ -119,7 +119,7 @@ content::SynchronousCompositor* RenderingTest::ActiveCompositor() const {

std::unique_ptr<cc::CompositorFrame> RenderingTest::ConstructEmptyFrame() {
auto compositor_frame = base::MakeUnique<cc::CompositorFrame>(
cc::test::MakeEmptyCompositorFrame());
viz::test::MakeEmptyCompositorFrame());
std::unique_ptr<cc::RenderPass> root_pass(cc::RenderPass::Create());
gfx::Rect viewport(browser_view_renderer_->size());
root_pass->SetNew(1, viewport, viewport, gfx::Transform());
Expand Down
2 changes: 1 addition & 1 deletion ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,6 @@ component("ash") {
"//base/third_party/dynamic_annotations",
"//cc",
"//cc/debug",
"//cc/surfaces",
"//chromeos",
"//chromeos:power_manager_proto",
"//components/device_event_log",
Expand All @@ -854,6 +853,7 @@ component("ash") {
"//components/session_manager:base",
"//components/signin/core/account_id",
"//components/user_manager",
"//components/viz/service",
"//components/wallpaper",
"//device/bluetooth",
"//gpu/command_buffer/client",
Expand Down
10 changes: 0 additions & 10 deletions cc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,6 @@ cc_static_library("test_support") {
"test/animation_timelines_test_common.h",
"test/begin_frame_source_test.cc",
"test/begin_frame_source_test.h",
"test/compositor_frame_helpers.cc",
"test/compositor_frame_helpers.h",
"test/fake_compositor_frame_sink_support_client.cc",
"test/fake_compositor_frame_sink_support_client.h",
"test/fake_content_layer_client.cc",
Expand Down Expand Up @@ -600,8 +598,6 @@ cc_static_library("test_support") {
"test/stub_layer_tree_host_client.h",
"test/stub_layer_tree_host_single_thread_client.cc",
"test/stub_layer_tree_host_single_thread_client.h",
"test/surface_hittest_test_helpers.cc",
"test/surface_hittest_test_helpers.h",
"test/task_graph_runner_test_template.cc",
"test/task_graph_runner_test_template.h",
"test/test_context_provider.cc",
Expand Down Expand Up @@ -647,7 +643,6 @@ cc_static_library("test_support") {
"//base/test:test_support",
"//base/third_party/dynamic_annotations",
"//cc/paint",
"//cc/surfaces",
"//components/viz/common",
"//components/viz/service",
"//components/viz/test:test_support",
Expand Down Expand Up @@ -818,8 +813,6 @@ cc_test("cc_unittests") {
"animation/keyframed_animation_curve_unittest.cc",
"animation/scroll_offset_animation_curve_unittest.cc",
"animation/transform_operations_unittest.cc",
"surfaces/surface_hittest_unittest.cc",
"surfaces/surface_unittest.cc",

# Setup.
"test/cc_test_suite.cc",
Expand All @@ -843,8 +836,6 @@ cc_test("cc_unittests") {
"//cc/ipc",
"//cc/ipc:test_interfaces",
"//cc/paint",
"//cc/surfaces",
"//cc/surfaces:surfaces",
"//components/viz/common",
"//components/viz/service",
"//components/viz/test:test_support",
Expand Down Expand Up @@ -899,7 +890,6 @@ cc_test("cc_perftests") {
"//cc/ipc",
"//cc/ipc:interfaces",
"//cc/paint",
"//cc/surfaces",
"//components/viz/common",
"//components/viz/test:test_support",
"//gpu",
Expand Down
1 change: 0 additions & 1 deletion cc/ipc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ cc_component("ipc") {

public_deps = [
"//cc",
"//cc/surfaces",
"//components/viz/common",
"//skia",
]
Expand Down
50 changes: 0 additions & 50 deletions cc/surfaces/BUILD.gn

This file was deleted.

3 changes: 0 additions & 3 deletions cc/surfaces/OWNERS

This file was deleted.

35 changes: 0 additions & 35 deletions cc/surfaces/stub_surface_reference_factory.h

This file was deleted.

29 changes: 0 additions & 29 deletions cc/surfaces/surfaces_export.h

This file was deleted.

34 changes: 0 additions & 34 deletions cc/test/compositor_frame_helpers.h

This file was deleted.

2 changes: 1 addition & 1 deletion cc/test/fake_compositor_frame_sink_support_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "cc/test/fake_compositor_frame_sink_support_client.h"

#include "cc/surfaces/surface_manager.h"
#include "components/viz/service/surfaces/surface_manager.h"

namespace cc {

Expand Down
4 changes: 2 additions & 2 deletions cc/test/fake_surface_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#define CC_TEST_FAKE_SURFACE_OBSERVER_H_

#include "base/containers/flat_set.h"
#include "cc/surfaces/surface_observer.h"
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "components/viz/common/surfaces/surface_id.h"
#include "components/viz/common/surfaces/surface_info.h"
#include "components/viz/service/surfaces/surface_observer.h"

namespace cc {

class FakeSurfaceObserver : public SurfaceObserver {
class FakeSurfaceObserver : public viz::SurfaceObserver {
public:
// If |damage_display| is true, the observer will indicate display damage when
// a surface is damaged.
Expand Down
3 changes: 1 addition & 2 deletions components/exo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ source_set("exo") {
"//base",
"//cc",
"//cc/ipc:interfaces",
"//cc/surfaces",
"//components/viz/service",
"//device/gamepad",
"//device/gamepad/public/cpp:shared_with_blink",
"//gpu",
Expand Down Expand Up @@ -149,7 +149,6 @@ source_set("unit_tests") {
"//base/test:test_support",
"//cc",
"//cc:test_support",
"//cc/surfaces:surfaces",
"//components/user_manager",
"//components/viz/service",
"//components/viz/test:test_support",
Expand Down
4 changes: 2 additions & 2 deletions components/exo/surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/texture_draw_quad.h"
#include "cc/resources/single_release_callback.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_manager.h"
#include "components/exo/buffer.h"
#include "components/exo/pointer.h"
#include "components/exo/surface_delegate.h"
#include "components/exo/surface_observer.h"
#include "components/viz/common/surfaces/sequence_surface_reference_factory.h"
#include "components/viz/service/surfaces/surface.h"
#include "components/viz/service/surfaces/surface_manager.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
Expand Down
12 changes: 6 additions & 6 deletions components/exo/surface_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/surfaces/surface.h"
#include "components/exo/surface.h"
#include "base/bind.h"
#include "cc/output/compositor_frame.h"
#include "cc/quads/texture_draw_quad.h"
#include "cc/test/fake_external_begin_frame_source.h"
#include "components/exo/buffer.h"
#include "components/exo/surface.h"
#include "components/exo/test/exo_test_base.h"
#include "components/exo/test/exo_test_helper.h"
#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
#include "components/viz/service/surfaces/surface.h"
#include "components/viz/test/begin_frame_args_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/env.h"
Expand Down Expand Up @@ -101,10 +101,10 @@ TEST_F(SurfaceTest, RequestFrameCallback) {

const cc::CompositorFrame& GetFrameFromSurface(Surface* surface) {
viz::SurfaceId surface_id = surface->GetSurfaceId();
cc::SurfaceManager* surface_manager = aura::Env::GetInstance()
->context_factory_private()
->GetFrameSinkManager()
->surface_manager();
viz::SurfaceManager* surface_manager = aura::Env::GetInstance()
->context_factory_private()
->GetFrameSinkManager()
->surface_manager();
const cc::CompositorFrame& frame =
surface_manager->GetSurfaceForId(surface_id)->GetActiveFrame();
return frame;
Expand Down
1 change: 0 additions & 1 deletion components/viz/client/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ viz_source_set("client") {
"//base",
"//cc",
"//cc/ipc:interfaces",
"//cc/surfaces",
"//components/viz/common",
"//mojo/public/cpp/bindings",
]
Expand Down
2 changes: 0 additions & 2 deletions components/viz/host/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ viz_component("host") {
deps = [
"//base",
"//cc/ipc:interfaces",
"//cc/surfaces",
"//gpu/ipc/client",
"//gpu/ipc/common",
"//services/ui/gpu/interfaces",
Expand Down Expand Up @@ -48,7 +47,6 @@ viz_source_set("unit_tests") {
"//base",
"//base/test:test_support",
"//cc/ipc:interfaces",
"//cc/surfaces",
"//components/viz/host/hit_test:unit_tests",
"//gpu/ipc/host",
"//mojo/public/cpp/bindings",
Expand Down
1 change: 0 additions & 1 deletion components/viz/host/DEPS
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include_rules = [
"+cc/ipc",
"+cc/surfaces",
"+components/viz/host",
"+gpu/command_buffer/client",
"+gpu/command_buffer/common",
Expand Down
Loading

0 comments on commit e478607

Please sign in to comment.