diff options
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/common/cmd_buffer_common.cc | 10 | ||||
-rw-r--r-- | gpu/command_buffer/common/command_buffer.h | 8 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gpu/command_buffer/common/cmd_buffer_common.cc b/gpu/command_buffer/common/cmd_buffer_common.cc index 0bfc9e1..235cc5d 100644 --- a/gpu/command_buffer/common/cmd_buffer_common.cc +++ b/gpu/command_buffer/common/cmd_buffer_common.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 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. @@ -31,6 +31,14 @@ const char* GetCommandName(CommandId command_id) { } // namespace cmd +// TODO(apatrick): this is a temporary optimization while skia is calling +// RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 +// ints redundantly when only the error is needed for the CommandBufferProxy +// implementation. +error::Error CommandBuffer::GetLastError() { + return GetLastState().error; +} + } // namespace gpu diff --git a/gpu/command_buffer/common/command_buffer.h b/gpu/command_buffer/common/command_buffer.h index ec4cc14..ee8fe06 100644 --- a/gpu/command_buffer/common/command_buffer.h +++ b/gpu/command_buffer/common/command_buffer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 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. @@ -134,6 +134,12 @@ class CommandBuffer { // call this first. virtual void SetContextLostReason(error::ContextLostReason) = 0; + // TODO(apatrick): this is a temporary optimization while skia is calling + // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 + // ints redundantly when only the error is needed for the CommandBufferProxy + // implementation. + virtual error::Error GetLastError(); + private: DISALLOW_COPY_AND_ASSIGN(CommandBuffer); }; |