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

Unified Diff: sky/viewer/compositor/texture_cache.cc

Issue 1235093002: Move sky_viewer into services/sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: again Created 5 years, 5 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 | « sky/viewer/compositor/texture_cache.h ('k') | sky/viewer/content_handler_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/compositor/texture_cache.cc
diff --git a/sky/viewer/compositor/texture_cache.cc b/sky/viewer/compositor/texture_cache.cc
deleted file mode 100644
index deff4443bc3ae48d300d52a2c0bf986068e62d40..0000000000000000000000000000000000000000
--- a/sky/viewer/compositor/texture_cache.cc
+++ /dev/null
@@ -1,37 +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 "sky/viewer/compositor/texture_cache.h"
-
-#include "mojo/converters/geometry/geometry_type_converters.h"
-#include "mojo/gpu/gl_texture.h"
-
-namespace sky {
-
-TextureCache::TextureCache() {
-}
-
-TextureCache::~TextureCache() {
-}
-
-scoped_ptr<mojo::GLTexture> TextureCache::GetTexture(const gfx::Size& size) {
- if (size != size_) {
- available_textures_.clear();
- size_ = size;
- }
- if (available_textures_.empty())
- return nullptr;
- scoped_ptr<mojo::GLTexture> texture(available_textures_.back());
- available_textures_.back() = nullptr;
- available_textures_.pop_back();
- return texture.Pass();
-}
-
-void TextureCache::PutTexture(scoped_ptr<mojo::GLTexture> texture) {
- if (texture->size() != size_)
- return;
- available_textures_.push_back(texture.release());
-}
-
-} // namespace sky
« no previous file with comments | « sky/viewer/compositor/texture_cache.h ('k') | sky/viewer/content_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698