Commit 87d78f27 authored by sadrul's avatar sadrul Committed by Commit bot

Revert of Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink...

Revert of Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (patchset #54 id:1050001 of https://codereview.chromium.org/2493223002/ )

Reason for revert:
Breaks test (DesktopMediaListAshTest.ScreenOnly) in chromeos-ozone builds.

Original issue's description:
> Moved exo::SurfaceFactoryOwner to its own file and renamed it to exo::CompositorFrameSink.
>
> CompositorFrameSink implements cc::mojom::MojoCompositorFrameSink.
>
> CompositorFrameSink is no longer a friend class of exo::Surface.
>
> Added exo::CompositorFrameSinkHolder class that implements cc::mojom::MojoCompositorFrameSinkClient.
>
> BUG=659601
> CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
>
> Review-Url: https://codereview.chromium.org/2493223002

TBR=reveman@chromium.org,fsamuel@chromium.org,jbauman@chromium.org,sky@chromium.org,staraz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=659601

Review-Url: https://codereview.chromium.org/2566813002
Cr-Commit-Position: refs/heads/master@{#437753}
parent 3d1922bf
......@@ -160,10 +160,6 @@ void AshTestHelper::SetUp(bool start_session,
void AshTestHelper::TearDown() {
// Tear down the shell.
Shell::DeleteInstance();
// Suspend the tear down until all resources are returned via
// MojoCompositorFrameSinkClient::ReclaimResources()
RunAllPendingInMessageLoop();
material_design_state_.reset();
test::MaterialDesignControllerTestAPI::Uninitialize();
ash_test_environment_->TearDown();
......
......@@ -66,9 +66,6 @@ TEST_F(DesktopMediaListAshTest, Screen) {
.WillRepeatedly(DoDefault());
list_->StartUpdating(&observer_);
base::RunLoop().Run();
// Reset the unique_ptr so the list stops refreshing.
list_.reset();
}
TEST_F(DesktopMediaListAshTest, OneWindow) {
......
......@@ -9,10 +9,6 @@ source_set("exo") {
sources = [
"buffer.cc",
"buffer.h",
"compositor_frame_sink.cc",
"compositor_frame_sink.h",
"compositor_frame_sink_holder.cc",
"compositor_frame_sink_holder.h",
"display.cc",
"display.h",
"gamepad.cc",
......@@ -160,7 +156,6 @@ test("exo_unittests") {
"//base",
"//base/test:test_support",
"//device/gamepad:test_helpers",
"//mojo/edk/embedder:headers",
]
data_deps = [
......
......@@ -4,15 +4,8 @@ include_rules = [
"+chromeos/audio/chromeos_sounds.h",
"+device/gamepad",
"+gpu",
"+mojo/public/cpp",
"+services/ui/public/cpp",
"+third_party/khronos",
"+third_party/skia",
"+ui",
]
specific_include_rules = {
"run_all_unittests\.cc": [
"+mojo/edk/embedder/embedder.h",
],
}
// Copyright 2016 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 "components/exo/compositor_frame_sink.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_manager.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
namespace exo {
////////////////////////////////////////////////////////////////////////////////
// ExoComopositorFrameSink, public:
// static
void CompositorFrameSink::Create(
const cc::FrameSinkId& frame_sink_id,
cc::SurfaceManager* surface_manager,
cc::mojom::MojoCompositorFrameSinkClientPtr client,
cc::mojom::MojoCompositorFrameSinkRequest request) {
std::unique_ptr<CompositorFrameSink> impl =
base::MakeUnique<CompositorFrameSink>(frame_sink_id, surface_manager,
std::move(client));
CompositorFrameSink* compositor_frame_sink = impl.get();
compositor_frame_sink->binding_ =
mojo::MakeStrongBinding(std::move(impl), std::move(request));
}
CompositorFrameSink::CompositorFrameSink(
const cc::FrameSinkId& frame_sink_id,
cc::SurfaceManager* surface_manager,
cc::mojom::MojoCompositorFrameSinkClientPtr client)
: support_(this, surface_manager, frame_sink_id, nullptr),
client_(std::move(client)) {}
CompositorFrameSink::~CompositorFrameSink() {}
////////////////////////////////////////////////////////////////////////////////
// cc::mojom::MojoCompositorFrameSink overrides:
void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) {
support_.SetNeedsBeginFrame(needs_begin_frame);
}
void CompositorFrameSink::SubmitCompositorFrame(
const cc::LocalFrameId& local_frame_id,
cc::CompositorFrame frame) {
support_.SubmitCompositorFrame(local_frame_id, std::move(frame));
}
void CompositorFrameSink::AddSurfaceReferences(
const std::vector<cc::SurfaceReference>& references) {
// TODO(fsamuel, staraz): Implement this.
NOTIMPLEMENTED();
}
void CompositorFrameSink::RemoveSurfaceReferences(
const std::vector<cc::SurfaceReference>& references) {
// TODO(fsamuel, staraz): Implement this.
NOTIMPLEMENTED();
}
void CompositorFrameSink::EvictFrame() {
support_.EvictFrame();
}
void CompositorFrameSink::Require(const cc::LocalFrameId& local_frame_id,
const cc::SurfaceSequence& sequence) {
support_.Require(local_frame_id, sequence);
}
void CompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) {
support_.Satisfy(sequence);
}
////////////////////////////////////////////////////////////////////////////////
// cc::CompositorFrameSinkSupportClient overrides:
void CompositorFrameSink::DidReceiveCompositorFrameAck() {
if (client_)
client_->DidReceiveCompositorFrameAck();
}
void CompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
if (client_)
client_->OnBeginFrame(args);
}
void CompositorFrameSink::ReclaimResources(
const cc::ReturnedResourceArray& resources) {
if (client_)
client_->ReclaimResources(resources);
}
void CompositorFrameSink::WillDrawSurface() {
if (client_)
client_->WillDrawSurface();
}
} // namespace exo
// Copyright 2016 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 COMPONENTS_EXO_EXO_COMPOSITOR_FRAME_SINK_H_
#define COMPONENTS_EXO_EXO_COMPOSITOR_FRAME_SINK_H_
#include "cc/ipc/compositor_frame.mojom.h"
#include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
#include "cc/resources/transferable_resource.h"
#include "cc/surfaces/compositor_frame_sink_support.h"
#include "cc/surfaces/compositor_frame_sink_support_client.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
namespace exo {
class CompositorFrameSink : public cc::CompositorFrameSinkSupportClient,
public cc::mojom::MojoCompositorFrameSink {
public:
static void Create(const cc::FrameSinkId& frame_sink_id,
cc::SurfaceManager* surface_manager,
cc::mojom::MojoCompositorFrameSinkClientPtr client,
cc::mojom::MojoCompositorFrameSinkRequest request);
CompositorFrameSink(const cc::FrameSinkId& frame_sink_id,
cc::SurfaceManager* surface_manager,
cc::mojom::MojoCompositorFrameSinkClientPtr client);
~CompositorFrameSink() override;
// Overridden from cc::mojom::MojoCompositorFrameSink:
void SetNeedsBeginFrame(bool needs_begin_frame) override;
void SubmitCompositorFrame(const cc::LocalFrameId& local_frame_id,
cc::CompositorFrame frame) override;
void AddSurfaceReferences(
const std::vector<cc::SurfaceReference>& references) override;
void RemoveSurfaceReferences(
const std::vector<cc::SurfaceReference>& references) override;
void EvictFrame() override;
void Require(const cc::LocalFrameId& local_frame_id,
const cc::SurfaceSequence& sequence) override;
void Satisfy(const cc::SurfaceSequence& sequence) override;
// Overridden from cc::CompositorFrameSinkSupportClient:
void DidReceiveCompositorFrameAck() override;
void OnBeginFrame(const cc::BeginFrameArgs& args) override;
void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
void WillDrawSurface() override;
private:
cc::CompositorFrameSinkSupport support_;
cc::mojom::MojoCompositorFrameSinkClientPtr client_;
cc::ReturnedResourceArray surface_returned_resources_;
mojo::StrongBindingPtr<cc::mojom::MojoCompositorFrameSink> binding_;
DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink);
};
} // namespace exo
#endif // COMPONENTS_EXO_EXO_COMPOSITOR_FRAME_SINK_H_
// Copyright 2016 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 "components/exo/compositor_frame_sink_holder.h"
#include "cc/resources/returned_resource.h"
#include "components/exo/surface.h"
namespace exo {
////////////////////////////////////////////////////////////////////////////////
// CompositorFrameSinkHolder, public:
CompositorFrameSinkHolder::CompositorFrameSinkHolder(
Surface* surface,
std::unique_ptr<CompositorFrameSink> frame_sink,
cc::mojom::MojoCompositorFrameSinkClientRequest request)
: surface_(surface),
frame_sink_(std::move(frame_sink)),
begin_frame_source_(base::MakeUnique<cc::ExternalBeginFrameSource>(this)),
binding_(this, std::move(request)),
weak_factory_(this) {
surface_->AddSurfaceObserver(this);
}
bool CompositorFrameSinkHolder::HasReleaseCallbackForResource(
cc::ResourceId id) {
return release_callbacks_.find(id) != release_callbacks_.end();
}
void CompositorFrameSinkHolder::AddResourceReleaseCallback(
cc::ResourceId id,
std::unique_ptr<cc::SingleReleaseCallback> callback) {
release_callbacks_[id] = std::make_pair(this, std::move(callback));
}
void CompositorFrameSinkHolder::ActivateFrameCallbacks(
std::list<FrameCallback>* frame_callbacks) {
active_frame_callbacks_.splice(active_frame_callbacks_.end(),
*frame_callbacks);
UpdateNeedsBeginFrame();
}
void CompositorFrameSinkHolder::CancelFrameCallbacks() {
// Call pending frame callbacks with a null frame time to indicate that they
// have been cancelled.
for (const auto& frame_callback : active_frame_callbacks_)
frame_callback.Run(base::TimeTicks());
}
void CompositorFrameSinkHolder::SetNeedsBeginFrame(bool needs_begin_frame) {
needs_begin_frame_ = needs_begin_frame;
OnNeedsBeginFrames(needs_begin_frame);
}
void CompositorFrameSinkHolder::Satisfy(const cc::SurfaceSequence& sequence) {
frame_sink_->Satisfy(sequence);
}
void CompositorFrameSinkHolder::Require(const cc::SurfaceId& id,
const cc::SurfaceSequence& sequence) {
frame_sink_->Require(id.local_frame_id(), sequence);
}
////////////////////////////////////////////////////////////////////////////////
// cc::mojom::MojoCompositorFrameSinkClient overrides:
void CompositorFrameSinkHolder::DidReceiveCompositorFrameAck() {
// TODO(staraz): Implement this
}
void CompositorFrameSinkHolder::OnBeginFrame(const cc::BeginFrameArgs& args) {
while (!active_frame_callbacks_.empty()) {
active_frame_callbacks_.front().Run(args.frame_time);
active_frame_callbacks_.pop_front();
}
begin_frame_source_->OnBeginFrame(args);
}
void CompositorFrameSinkHolder::ReclaimResources(
const cc::ReturnedResourceArray& resources) {
for (auto& resource : resources) {
auto it = release_callbacks_.find(resource.id);
DCHECK(it != release_callbacks_.end());
std::unique_ptr<cc::SingleReleaseCallback> callback =
std::move(it->second.second);
release_callbacks_.erase(it);
callback->Run(resource.sync_token, resource.lost);
}
}
void CompositorFrameSinkHolder::WillDrawSurface() {
if (surface_)
surface_->WillDraw();
UpdateNeedsBeginFrame();
}
////////////////////////////////////////////////////////////////////////////////
// cc::BeginFrameObserver overrides:
const cc::BeginFrameArgs& CompositorFrameSinkHolder::LastUsedBeginFrameArgs()
const {
return last_begin_frame_args_;
}
void CompositorFrameSinkHolder::OnBeginFrameSourcePausedChanged(bool paused) {}
////////////////////////////////////////////////////////////////////////////////
// cc::ExternalBeginFrameSouceClient overrides:
void CompositorFrameSinkHolder::OnNeedsBeginFrames(bool needs_begin_frames) {
frame_sink_->SetNeedsBeginFrame(needs_begin_frames);
}
////////////////////////////////////////////////////////////////////////////////
// SurfaceObserver overrides:
void CompositorFrameSinkHolder::OnSurfaceDestroying(Surface* surface) {
surface_->RemoveSurfaceObserver(this);
surface_ = nullptr;
}
////////////////////////////////////////////////////////////////////////////////
// ExoComopositorFrameSink, private:
CompositorFrameSinkHolder::~CompositorFrameSinkHolder() {}
void CompositorFrameSinkHolder::UpdateNeedsBeginFrame() {
if (!begin_frame_source_)
return;
bool needs_begin_frame = !active_frame_callbacks_.empty();
if (needs_begin_frame == needs_begin_frame_)
return;
needs_begin_frame_ = needs_begin_frame;
OnNeedsBeginFrames(needs_begin_frame_);
}
} // namespace exo
// Copyright 2016 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 COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
#define COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
#include <list>
#include <map>
#include <memory>
#include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
#include "cc/resources/single_release_callback.h"
#include "cc/resources/transferable_resource.h"
#include "cc/scheduler/begin_frame_source.h"
#include "components/exo/compositor_frame_sink.h"
#include "components/exo/surface_observer.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace exo {
class Surface;
// This class talks to MojoCompositorFrameSink and keeps track of references to
// the contents of Buffers. It's keeped alive by references from
// release_callbacks_. It's destroyed when its owning Surface is destroyed and
// the last outstanding release callback is called.
class CompositorFrameSinkHolder
: public base::RefCounted<CompositorFrameSinkHolder>,
public cc::ExternalBeginFrameSourceClient,
public cc::mojom::MojoCompositorFrameSinkClient,
public cc::BeginFrameObserver,
public SurfaceObserver {
public:
CompositorFrameSinkHolder(
Surface* surface,
std::unique_ptr<CompositorFrameSink> frame_sink,
cc::mojom::MojoCompositorFrameSinkClientRequest request);
bool HasReleaseCallbackForResource(cc::ResourceId id);
void AddResourceReleaseCallback(
cc::ResourceId id,
std::unique_ptr<cc::SingleReleaseCallback> callback);
CompositorFrameSink* GetCompositorFrameSink() { return frame_sink_.get(); }
base::WeakPtr<CompositorFrameSinkHolder> GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
using FrameCallback = base::Callback<void(base::TimeTicks frame_time)>;
void ActivateFrameCallbacks(std::list<FrameCallback>* frame_callbacks);
void CancelFrameCallbacks();
void SetNeedsBeginFrame(bool needs_begin_frame);
void Satisfy(const cc::SurfaceSequence& sequence);
void Require(const cc::SurfaceId& id, const cc::SurfaceSequence& sequence);
// Overridden from cc::mojom::MojoCompositorFrameSinkClient:
void DidReceiveCompositorFrameAck() override;
void OnBeginFrame(const cc::BeginFrameArgs& args) override;
void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
void WillDrawSurface() override;
// Overridden from cc::BeginFrameObserver:
const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override;
void OnBeginFrameSourcePausedChanged(bool paused) override;
// Overridden from cc::ExternalBeginFrameSouceClient:
void OnNeedsBeginFrames(bool needs_begin_frames) override;
// Overridden from SurfaceObserver:
void OnSurfaceDestroying(Surface* surface) override;
private:
friend class base::RefCounted<CompositorFrameSinkHolder>;
~CompositorFrameSinkHolder() override;
void UpdateNeedsBeginFrame();
// Each release callback holds a reference to the CompositorFrameSinkHolder
// itself to keep it alive. Running and erasing the callbacks might result in
// the instance being destroyed. Therefore, we should not access any member
// variables after running and erasing the callbacks.
using ResourceReleaseCallbackMap =
std::map<int,
std::pair<scoped_refptr<CompositorFrameSinkHolder>,
std::unique_ptr<cc::SingleReleaseCallback>>>;
ResourceReleaseCallbackMap release_callbacks_;
Surface* surface_;
std::unique_ptr<CompositorFrameSink> frame_sink_;
std::list<FrameCallback> active_frame_callbacks_;
std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_;
bool needs_begin_frame_ = false;
cc::BeginFrameArgs last_begin_frame_args_;
mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient> binding_;
base::WeakPtrFactory<CompositorFrameSinkHolder> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkHolder);
};
} // namespace exo
#endif // COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
This diff is collapsed.
......@@ -17,9 +17,7 @@
#include "base/observer_list.h"
#include "cc/resources/transferable_resource.h"
#include "cc/scheduler/begin_frame_source.h"
#include "cc/surfaces/surface_id_allocator.h"
#include "components/exo/compositor_frame_sink.h"
#include "components/exo/compositor_frame_sink_holder.h"
#include "cc/surfaces/surface_factory_client.h"
#include "third_party/skia/include/core/SkBlendMode.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/aura/window.h"
......@@ -33,6 +31,7 @@ class TracedValue;
}
namespace cc {
class SurfaceFactory;
class SurfaceIdAllocator;
}
......@@ -58,9 +57,42 @@ class PropertyHelper;
// change in the future when better hardware cursor support is added.
using CursorProvider = Pointer;
// This class owns the SurfaceFactory and keeps track of references to the
// contents of Buffers. It's keeped alive by references from
// release_callbacks_. It's destroyed when its owning Surface is destroyed and
// the last outstanding release callback is called.
class SurfaceFactoryOwner : public base::RefCounted<SurfaceFactoryOwner>,
public cc::SurfaceFactoryClient {
public:
SurfaceFactoryOwner();
// Overridden from cc::SurfaceFactoryClient:
void ReturnResources(const cc::ReturnedResourceArray& resources) override;
void WillDrawSurface(const cc::LocalFrameId& id,
const gfx::Rect& damage_rect) override;
void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
private:
friend class base::RefCounted<SurfaceFactoryOwner>;
friend class Surface;
~SurfaceFactoryOwner() override;
std::map<int,
std::pair<scoped_refptr<SurfaceFactoryOwner>,
std::unique_ptr<cc::SingleReleaseCallback>>>
release_callbacks_;
cc::FrameSinkId frame_sink_id_;
std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
std::unique_ptr<cc::SurfaceFactory> surface_factory_;
Surface* surface_ = nullptr;
};
// This class represents a rectangular area that is displayed on the screen.
// It has a location, size and pixel contents.
class Surface : public ui::ContextFactoryObserver, public aura::WindowObserver {
class Surface : public ui::ContextFactoryObserver,
public aura::WindowObserver,
public cc::BeginFrameObserver {
public:
using PropertyDeallocator = void (*)(int64_t value);
......@@ -72,12 +104,9 @@ class Surface : public ui::ContextFactoryObserver, public aura::WindowObserver {
aura::Window* window() { return window_.get(); }
const cc::LocalFrameId& local_frame_id() const { return local_frame_id_; }
cc::SurfaceId GetSurfaceId() const;
CompositorFrameSinkHolder* compositor_frame_sink_holder() {
return compositor_frame_sink_holder_.get();
}
// Set a buffer as the content of this surface. A buffer can only be attached
// to one surface at a time.
void Attach(Buffer* buffer);
......@@ -200,6 +229,11 @@ class Surface : public ui::ContextFactoryObserver, public aura::WindowObserver {
void OnWindowRemovingFromRootWindow(aura::Window* window,
aura::Window* new_root) override;
// Overridden from cc::BeginFrameObserver:
void OnBeginFrame(const cc::BeginFrameArgs& args) override;
const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override;
void OnBeginFrameSourcePausedChanged(bool paused) override {}
// Sets the |value| of the given surface |property|. Setting to the default
// value (e.g., NULL) removes the property. The caller is responsible for the
// lifetime of any object set as a property on the Surface.
......@@ -280,6 +314,9 @@ class Surface : public ui::ContextFactoryObserver, public aura::WindowObserver {
// current_resource_.
void UpdateSurface(bool full_damage);
// Adds/Removes begin frame observer based on state.
void UpdateNeedsBeginFrame();
int64_t SetPropertyInternal(const void* key,
const char* name,
PropertyDeallocator deallocator,
......@@ -313,12 +350,12 @@ class Surface : public ui::ContextFactoryObserver, public aura::WindowObserver {
// The buffer that will become the content of surface when Commit() is called.
BufferAttachment pending_buffer_;
const cc::FrameSinkId frame_sink_id_;
cc::LocalFrameId local_frame_id_;
cc::SurfaceManager* surface_manager_;
scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder_;
scoped_refptr<SurfaceFactoryOwner> factory_owner_;
cc::SurfaceIdAllocator id_allocator_;
// The Surface Id currently attached to the window.
cc::LocalFrameId local_frame_id_;
// The next resource id the buffer will be attached to.
int next_resource_id_ = 1;
......@@ -333,6 +370,7 @@ class Surface : public ui::ContextFactoryObserver, public aura::WindowObserver {
// be drawn. They fire at the first begin frame notification after this.
std::list<FrameCallback> pending_frame_callbacks_;
std::list<FrameCallback> frame_callbacks_;
std::list<FrameCallback> active_frame_callbacks_;
// This is the state that has yet to be committed.
State pending_state_;
......@@ -369,6 +407,11 @@ class Surface : public ui::ContextFactoryObserver, public aura::WindowObserver {
// maintains.
SurfaceDelegate* delegate_ = nullptr;
// The begin frame source being observed.
cc::BeginFrameSource* begin_frame_source_ = nullptr;
cc::BeginFrameArgs last_begin_frame_args_;
bool needs_begin_frame_ = false;
struct Value {
const char* name;
int64_t value;
......
......@@ -50,11 +50,6 @@ TEST_F(SurfaceTest, Attach) {
// attached buffer.
surface->Attach(nullptr);
surface->Commit();
// CompositorFrameSinkHolder::ReclaimResources() gets called via
// MojoCompositorFrameSinkClient interface. We need to wait here for the mojo
// call to finish so that the release callback finishes running before
// the assertion below.
RunAllPendingInMessageLoop();
ASSERT_EQ(1, release_buffer_call_count);
}
......@@ -210,7 +205,6 @@ TEST_F(SurfaceTest, SetBlendMode) {
surface->Attach(buffer.get());
surface->SetBlendMode(SkBlendMode::kSrc);
surface->Commit();
RunAllPendingInMessageLoop();
const cc::CompositorFrame& frame = GetFrameFromSurface(surface.get());
ASSERT_EQ(1u, frame.render_pass_list.size());
......@@ -228,7 +222,6 @@ TEST_F(SurfaceTest, OverlayCandidate) {
surface->Attach(buffer.get());
surface->Commit();
RunAllPendingInMessageLoop();
const cc::CompositorFrame& frame = GetFrameFromSurface(surface.get());
ASSERT_EQ(1u, frame.render_pass_list.size());
......
......@@ -6,17 +6,9 @@
#include "base/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#if !defined(OS_IOS)
#include "mojo/edk/embedder/embedder.h"
#endif
int main(int argc, char** argv) {
ash::test::AuraShellTestSuite test_suite(argc, argv);
#if !defined(OS_IOS)
mojo::edk::Init();
#endif
return base::LaunchUnitTestsSerially(
argc, argv, base::Bind(&ash::test::AuraShellTestSuite::Run,
base::Unretained(&test_suite)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment