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

Side by Side Diff: cc/resources/resource_provider.cc

Issue 26023004: aura: Allow delegated frames to be used by more than one impl layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: frameprovider: are_layers_attached checks Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/test/fake_delegated_renderer_layer.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/resources/resource_provider.h" 5 #include "cc/resources/resource_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 1472
1473 void ResourceProvider::CreateForTesting(ResourceId id) { 1473 void ResourceProvider::CreateForTesting(ResourceId id) {
1474 LazyCreate(GetResource(id)); 1474 LazyCreate(GetResource(id));
1475 } 1475 }
1476 1476
1477 GLint ResourceProvider::WrapModeForTesting(ResourceId id) { 1477 GLint ResourceProvider::WrapModeForTesting(ResourceId id) {
1478 Resource* resource = GetResource(id); 1478 Resource* resource = GetResource(id);
1479 return resource->wrap_mode; 1479 return resource->wrap_mode;
1480 } 1480 }
1481 1481
1482 GLenum ResourceProvider::TargetForTesting(ResourceId id) {
1483 Resource* resource = GetResource(id);
1484 return resource->target;
1485 }
1486
1482 void ResourceProvider::LazyCreate(Resource* resource) { 1487 void ResourceProvider::LazyCreate(Resource* resource) {
1483 if (resource->type != GLTexture || resource->gl_id != 0) 1488 if (resource->type != GLTexture || resource->gl_id != 0)
1484 return; 1489 return;
1485 1490
1486 // Early out for resources that don't require texture creation. 1491 // Early out for resources that don't require texture creation.
1487 if (resource->texture_pool == 0) 1492 if (resource->texture_pool == 0)
1488 return; 1493 return;
1489 1494
1490 WebGraphicsContext3D* context3d = Context3d(); 1495 WebGraphicsContext3D* context3d = Context3d();
1491 DCHECK(context3d); 1496 DCHECK(context3d);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 } 1702 }
1698 NOTREACHED(); 1703 NOTREACHED();
1699 return GL_RGBA; 1704 return GL_RGBA;
1700 } 1705 }
1701 1706
1702 GLenum ResourceProvider::GetGLInternalFormat(ResourceFormat format) { 1707 GLenum ResourceProvider::GetGLInternalFormat(ResourceFormat format) {
1703 return GetGLDataFormat(format); 1708 return GetGLDataFormat(format);
1704 } 1709 }
1705 1710
1706 } // namespace cc 1711 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/test/fake_delegated_renderer_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698