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

Side by Side Diff: sky/compositor/texture_cache.h

Issue 868263002: Sky shouldn't crash on device rotate (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « sky/compositor/resource_manager.cc ('k') | sky/compositor/texture_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKY_COMPOSITOR_TEXTURE_CACHE_H_
6 #define SKY_COMPOSITOR_TEXTURE_CACHE_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h"
10 #include "ui/gfx/geometry/size.h"
11
12 namespace mojo {
13 class GLTexture;
14 }
15
16 namespace sky {
17
18 class TextureCache {
19 public:
20 TextureCache();
21 ~TextureCache();
22
23 scoped_ptr<mojo::GLTexture> GetTexture(const gfx::Size& size);
24 void PutTexture(scoped_ptr<mojo::GLTexture> texture);
25
26 private:
27 gfx::Size size_;
28 ScopedVector<mojo::GLTexture> available_textures_;
29
30 DISALLOW_COPY_AND_ASSIGN(TextureCache);
31 };
32
33 } // namespace sky
34
35 #endif // SKY_COMPOSITOR_TEXTURE_CACHE_H_
OLDNEW
« no previous file with comments | « sky/compositor/resource_manager.cc ('k') | sky/compositor/texture_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698