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

Unified Diff: mojo/gpu/texture_uploader_unittest.cc

Issue 1533753002: Remove TextureCache and TextureUploader. (Closed) Base URL: git@github.com:domokit/mojo.git@cl-2a
Patch Set: rebase Created 5 years 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 | « mojo/gpu/texture_uploader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gpu/texture_uploader_unittest.cc
diff --git a/mojo/gpu/texture_uploader_unittest.cc b/mojo/gpu/texture_uploader_unittest.cc
deleted file mode 100644
index b8c553ef6b9c35757e0b7335f75074031bfbd6cf..0000000000000000000000000000000000000000
--- a/mojo/gpu/texture_uploader_unittest.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 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 "mojo/gpu/texture_uploader.h"
-
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "mojo/gpu/texture_cache.h"
-#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/public/cpp/application/application_test_base.h"
-#include "mojo/public/cpp/application/connect.h"
-#include "mojo/services/surfaces/interfaces/surface_id.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-class TextureUploaderTest : public mojo::test::ApplicationTestBase {
- public:
- TextureUploaderTest() : surface_id_(1u), weak_factory_(this) {}
- ~TextureUploaderTest() override {}
-
- void SetUp() override {
- mojo::test::ApplicationTestBase::SetUp();
-
- mojo::ServiceProviderPtr surfaces_service_provider;
- application_impl()->shell()->ConnectToApplication(
- "mojo:surfaces_service", mojo::GetProxy(&surfaces_service_provider),
- nullptr);
- mojo::ConnectToService(surfaces_service_provider.get(), &surface_);
- gl_context_ = mojo::GLContext::Create(application_impl()->shell());
- surface_->CreateSurface(surface_id_);
- texture_cache_.reset(new mojo::TextureCache(gl_context_, nullptr));
- }
-
- void OnFrameCompleteExit() { base::MessageLoop::current()->Quit(); }
-
- protected:
- uint32_t surface_id_;
- base::WeakPtr<mojo::GLContext> gl_context_;
- scoped_ptr<mojo::TextureCache> texture_cache_;
- mojo::SurfacePtr surface_;
- base::WeakPtrFactory<TextureUploaderTest> weak_factory_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TextureUploaderTest);
-};
-
-TEST_F(TextureUploaderTest, Base) {
- mojo::Size size;
- size.width = 100;
- size.height = 100;
- scoped_ptr<mojo::TextureCache::TextureInfo> texture_info(
- texture_cache_->GetTexture(size).Pass());
- mojo::FramePtr frame = mojo::TextureUploader::GetUploadFrame(
- gl_context_, texture_info->resource_id(), texture_info->TakeTexture());
- EXPECT_FALSE(frame.is_null());
-}
-
-} // namespace
« no previous file with comments | « mojo/gpu/texture_uploader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698