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

Unified Diff: cc/layers/heads_up_display_layer_impl_unittest.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/heads_up_display_layer_impl.cc ('k') | cc/layers/heads_up_display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl_unittest.cc
diff --git a/cc/layers/heads_up_display_layer_impl_unittest.cc b/cc/layers/heads_up_display_layer_impl_unittest.cc
deleted file mode 100644
index ab38fdd087dd3db2a28a4d54e766d52efd02c07c..0000000000000000000000000000000000000000
--- a/cc/layers/heads_up_display_layer_impl_unittest.cc
+++ /dev/null
@@ -1,57 +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.
-
-#include "cc/layers/append_quads_data.h"
-#include "cc/layers/heads_up_display_layer_impl.h"
-#include "cc/test/fake_impl_proxy.h"
-#include "cc/test/fake_layer_tree_host_impl.h"
-#include "cc/test/fake_output_surface.h"
-#include "cc/test/test_shared_bitmap_manager.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace cc {
-namespace {
-
-void CheckDrawLayer(HeadsUpDisplayLayerImpl* layer,
- ResourceProvider* resource_provider,
- DrawMode draw_mode) {
- scoped_ptr<RenderPass> render_pass = RenderPass::Create();
- AppendQuadsData data;
- bool will_draw = layer->WillDraw(draw_mode, resource_provider);
- if (will_draw)
- layer->AppendQuads(render_pass.get(), &data);
- layer->UpdateHudTexture(draw_mode, resource_provider);
- if (will_draw)
- layer->DidDraw(resource_provider);
-
- size_t expected_quad_list_size = will_draw ? 1 : 0;
- EXPECT_EQ(expected_quad_list_size, render_pass->quad_list.size());
-}
-
-TEST(HeadsUpDisplayLayerImplTest, ResourcelessSoftwareDrawAfterResourceLoss) {
- FakeImplProxy proxy;
- TestSharedBitmapManager shared_bitmap_manager;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager, nullptr);
- host_impl.CreatePendingTree();
- host_impl.InitializeRenderer(FakeOutputSurface::Create3d());
- scoped_ptr<HeadsUpDisplayLayerImpl> layer =
- HeadsUpDisplayLayerImpl::Create(host_impl.pending_tree(), 1);
- layer->SetBounds(gfx::Size(100, 100));
- layer->draw_properties().ideal_contents_scale = 1.f;
-
- // Check regular hardware draw is ok.
- CheckDrawLayer(
- layer.get(), host_impl.resource_provider(), DRAW_MODE_HARDWARE);
-
- // Simulate a resource loss on transitioning to resourceless software mode.
- layer->ReleaseResources();
-
- // Should skip resourceless software draw and not crash in UpdateHudTexture.
- CheckDrawLayer(layer.get(),
- host_impl.resource_provider(),
- DRAW_MODE_RESOURCELESS_SOFTWARE);
-}
-
-} // namespace
-} // namespace cc
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/heads_up_display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698