summaryrefslogtreecommitdiffstats
path: root/chromium/cc/resources/scoped_resource.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/resources/scoped_resource.cc')
-rw-r--r--chromium/cc/resources/scoped_resource.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chromium/cc/resources/scoped_resource.cc b/chromium/cc/resources/scoped_resource.cc
index 99f93c9bc85..68ae59fc0ba 100644
--- a/chromium/cc/resources/scoped_resource.cc
+++ b/chromium/cc/resources/scoped_resource.cc
@@ -15,7 +15,7 @@ ScopedResource::~ScopedResource() {
Free();
}
-void ScopedResource::Allocate(gfx::Size size,
+void ScopedResource::Allocate(const gfx::Size& size,
ResourceProvider::TextureUsageHint hint,
ResourceFormat format) {
DCHECK(!id());
@@ -25,12 +25,12 @@ void ScopedResource::Allocate(gfx::Size size,
set_id(resource_provider_->CreateResource(
size, GL_CLAMP_TO_EDGE, hint, format));
-#ifndef NDEBUG
+#if DCHECK_IS_ON
allocate_thread_id_ = base::PlatformThread::CurrentId();
#endif
}
-void ScopedResource::AllocateManaged(gfx::Size size,
+void ScopedResource::AllocateManaged(const gfx::Size& size,
GLenum target,
ResourceFormat format) {
DCHECK(!id());
@@ -44,14 +44,14 @@ void ScopedResource::AllocateManaged(gfx::Size size,
ResourceProvider::TextureUsageAny,
format));
-#ifndef NDEBUG
+#if DCHECK_IS_ON
allocate_thread_id_ = base::PlatformThread::CurrentId();
#endif
}
void ScopedResource::Free() {
if (id()) {
-#ifndef NDEBUG
+#if DCHECK_IS_ON
DCHECK(allocate_thread_id_ == base::PlatformThread::CurrentId());
#endif
resource_provider_->DeleteResource(id());