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

Side by Side Diff: sky/viewer/compositor/resource_manager.cc

Issue 1213683004: Move //sky/compositor to //sky/viewer/compositor (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « sky/viewer/compositor/resource_manager.h ('k') | sky/viewer/compositor/surface_allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/compositor/resource_manager.h" 5 #include "sky/viewer/compositor/resource_manager.h"
6 6
7 #ifndef GL_GLEXT_PROTOTYPES 7 #ifndef GL_GLEXT_PROTOTYPES
8 #define GL_GLEXT_PROTOTYPES 8 #define GL_GLEXT_PROTOTYPES
9 #endif 9 #endif
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "gpu/GLES2/gl2chromium.h" 13 #include "gpu/GLES2/gl2chromium.h"
14 #include "gpu/GLES2/gl2extchromium.h" 14 #include "gpu/GLES2/gl2extchromium.h"
15 #include "mojo/converters/geometry/geometry_type_converters.h" 15 #include "mojo/converters/geometry/geometry_type_converters.h"
16 #include "mojo/gpu/gl_context.h" 16 #include "mojo/gpu/gl_context.h"
17 #include "mojo/gpu/gl_texture.h" 17 #include "mojo/gpu/gl_texture.h"
18 #include "mojo/public/c/gles2/gles2.h" 18 #include "mojo/public/c/gles2/gles2.h"
19 #include "sky/compositor/layer.h" 19 #include "sky/viewer/compositor/layer.h"
20 20
21 namespace sky { 21 namespace sky {
22 22
23 ResourceManager::ResourceManager(base::WeakPtr<mojo::GLContext> gl_context) 23 ResourceManager::ResourceManager(base::WeakPtr<mojo::GLContext> gl_context)
24 : gl_context_(gl_context), next_resource_id_(0) { 24 : gl_context_(gl_context), next_resource_id_(0) {
25 } 25 }
26 26
27 ResourceManager::~ResourceManager() { 27 ResourceManager::~ResourceManager() {
28 STLDeleteContainerPairSecondPointers(resource_to_texture_map_.begin(), 28 STLDeleteContainerPairSecondPointers(resource_to_texture_map_.begin(),
29 resource_to_texture_map_.end()); 29 resource_to_texture_map_.end());
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 continue; 84 continue;
85 scoped_ptr<mojo::GLTexture> texture(iter->second); 85 scoped_ptr<mojo::GLTexture> texture(iter->second);
86 DCHECK_NE(0u, texture->texture_id()); 86 DCHECK_NE(0u, texture->texture_id());
87 resource_to_texture_map_.erase(iter); 87 resource_to_texture_map_.erase(iter);
88 glWaitSyncPointCHROMIUM(resource->sync_point); 88 glWaitSyncPointCHROMIUM(resource->sync_point);
89 texture_cache_.PutTexture(texture.Pass()); 89 texture_cache_.PutTexture(texture.Pass());
90 } 90 }
91 } 91 }
92 92
93 } // namespace examples 93 } // namespace examples
OLDNEW
« no previous file with comments | « sky/viewer/compositor/resource_manager.h ('k') | sky/viewer/compositor/surface_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698