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

Unified Diff: cc/scoped_texture.cc

Issue 11377055: cc: Rename Texture class to Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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 | « cc/scoped_texture.h ('k') | cc/scoped_texture_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scoped_texture.cc
diff --git a/cc/scoped_texture.cc b/cc/scoped_texture.cc
deleted file mode 100644
index 38fb7976e90e681d4e24f3ebab523dc5a2d67552..0000000000000000000000000000000000000000
--- a/cc/scoped_texture.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2012 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 "config.h"
-
-#include "cc/scoped_texture.h"
-
-namespace cc {
-
-ScopedTexture::ScopedTexture(ResourceProvider* resourceProvider)
- : m_resourceProvider(resourceProvider)
-{
- DCHECK(m_resourceProvider);
-}
-
-ScopedTexture::~ScopedTexture()
-{
- free();
-}
-
-bool ScopedTexture::allocate(int pool, const gfx::Size& size, GLenum format, ResourceProvider::TextureUsageHint hint)
-{
- DCHECK(!id());
- DCHECK(!size.IsEmpty());
-
- setDimensions(size, format);
- setId(m_resourceProvider->createResource(pool, size, format, hint));
-
-#ifndef NDEBUG
- m_allocateThreadIdentifier = base::PlatformThread::CurrentId();
-#endif
-
- return id();
-}
-
-void ScopedTexture::free()
-{
- if (id()) {
-#ifndef NDEBUG
- DCHECK(m_allocateThreadIdentifier == base::PlatformThread::CurrentId());
-#endif
- m_resourceProvider->deleteResource(id());
- }
- setId(0);
-}
-
-void ScopedTexture::leak()
-{
- setId(0);
-}
-
-} // namespace cc
« no previous file with comments | « cc/scoped_texture.h ('k') | cc/scoped_texture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698