summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-22 00:33:29 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-22 00:33:29 +0000
commite82fb7928fb3d6c7b980f8fae4b948eb6bfb7ee9 (patch)
tree092bcf52246ec3ccc0f5dd517ce42a20c64124c9 /gpu
parent959a694093db706173cccfec4c1e14717ce370e1 (diff)
downloadchromium_src-e82fb7928fb3d6c7b980f8fae4b948eb6bfb7ee9.zip
chromium_src-e82fb7928fb3d6c7b980f8fae4b948eb6bfb7ee9.tar.gz
chromium_src-e82fb7928fb3d6c7b980f8fae4b948eb6bfb7ee9.tar.bz2
Code cleanup: rename DisallowedExtensions to DisallowedFeature.
BUG=none TEST=bots green Review URL: http://codereview.chromium.org/7979031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/context_group.cc4
-rw-r--r--gpu/command_buffer/service/context_group.h4
-rw-r--r--gpu/command_buffer/service/context_group_unittest.cc4
-rw-r--r--gpu/command_buffer/service/feature_info.cc8
-rw-r--r--gpu/command_buffer/service/feature_info.h4
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc14
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.h6
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_mock.h2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc6
-rw-r--r--gpu/command_buffer/service/test_helper.cc2
-rw-r--r--gpu/command_buffer/service/test_helper.h4
-rw-r--r--gpu/demos/framework/window.cc2
-rw-r--r--gpu/gles2_conform_support/egl/display.cc2
13 files changed, 31 insertions, 31 deletions
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index b93c034..d04d1d8 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -45,13 +45,13 @@ static void GetIntegerv(GLenum pname, uint32* var) {
*var = value;
}
-bool ContextGroup::Initialize(const DisallowedExtensions& disallowed_extensions,
+bool ContextGroup::Initialize(const DisallowedFeatures& disallowed_features,
const char* allowed_features) {
if (initialized_) {
return true;
}
- if (!feature_info_.Initialize(disallowed_extensions, allowed_features)) {
+ if (!feature_info_.Initialize(disallowed_features, allowed_features)) {
LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo "
<< "initialization failed.";
return false;
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index f130dc6..1700423 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -28,7 +28,7 @@ class RenderbufferManager;
class ProgramManager;
class ShaderManager;
class TextureManager;
-struct DisallowedExtensions;
+struct DisallowedFeatures;
// A Context Group helps manage multiple GLES2Decoders that share
// resources.
@@ -40,7 +40,7 @@ class ContextGroup : public base::RefCounted<ContextGroup> {
~ContextGroup();
// This should only be called by GLES2Decoder.
- bool Initialize(const DisallowedExtensions& disallowed_extensions,
+ bool Initialize(const DisallowedFeatures& disallowed_features,
const char* allowed_features);
// Sets the ContextGroup has having a lost context.
diff --git a/gpu/command_buffer/service/context_group_unittest.cc b/gpu/command_buffer/service/context_group_unittest.cc
index c8a78f3..bf8809e 100644
--- a/gpu/command_buffer/service/context_group_unittest.cc
+++ b/gpu/command_buffer/service/context_group_unittest.cc
@@ -71,8 +71,8 @@ TEST_F(ContextGroupTest, Basic) {
TEST_F(ContextGroupTest, InitializeNoExtensions) {
TestHelper::SetupContextGroupInitExpectations(gl_.get(),
- DisallowedExtensions(), "");
- group_->Initialize(DisallowedExtensions(), "");
+ DisallowedFeatures(), "");
+ group_->Initialize(DisallowedFeatures(), "");
EXPECT_EQ(static_cast<uint32>(TestHelper::kNumVertexAttribs),
group_->max_vertex_attribs());
EXPECT_EQ(static_cast<uint32>(TestHelper::kNumTextureUnits),
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 1e1a86c..2270a38 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -81,14 +81,14 @@ class ExtensionHelper {
};
bool FeatureInfo::Initialize(const char* allowed_features) {
- disallowed_extensions_ = DisallowedExtensions();
+ disallowed_features_ = DisallowedFeatures();
AddFeatures(allowed_features);
return true;
}
-bool FeatureInfo::Initialize(const DisallowedExtensions& disallowed_extensions,
+bool FeatureInfo::Initialize(const DisallowedFeatures& disallowed_features,
const char* allowed_features) {
- disallowed_extensions_ = disallowed_extensions;
+ disallowed_features_ = disallowed_features;
AddFeatures(allowed_features);
return true;
}
@@ -301,7 +301,7 @@ void FeatureInfo::AddFeatures(const char* desired_features) {
}
// Check for multisample support
- if (!disallowed_extensions_.multisampling &&
+ if (!disallowed_features_.multisampling &&
ext.Desire("GL_CHROMIUM_framebuffer_multisample") &&
(ext.Have("GL_EXT_framebuffer_multisample") ||
ext.Have("GL_ANGLE_framebuffer_multisample"))) {
diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h
index 7d5ddb1..7a087bd 100644
--- a/gpu/command_buffer/service/feature_info.h
+++ b/gpu/command_buffer/service/feature_info.h
@@ -41,7 +41,7 @@ class FeatureInfo {
// If allowed features = NULL or "*", all features are allowed. Otherwise
// only features that match the strings in allowed_features are allowed.
bool Initialize(const char* allowed_features);
- bool Initialize(const DisallowedExtensions& disallowed_extensions,
+ bool Initialize(const DisallowedFeatures& disallowed_features,
const char* allowed_features);
// Turns on certain features if they can be turned on. NULL turns on
@@ -65,7 +65,7 @@ class FeatureInfo {
Validators validators_;
- DisallowedExtensions disallowed_extensions_;
+ DisallowedFeatures disallowed_features_;
// The extensions string returned by glGetString(GL_EXTENSIONS);
std::string extensions_;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 4a8b59f..d6c513e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -461,7 +461,7 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface,
const scoped_refptr<gfx::GLContext>& context,
const gfx::Size& size,
- const DisallowedExtensions& disallowed_extensions,
+ const DisallowedFeatures& disallowed_features,
const char* allowed_extensions,
const std::vector<int32>& attribs);
virtual void Destroy();
@@ -1306,7 +1306,7 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
scoped_ptr<ShaderTranslator> vertex_translator_;
scoped_ptr<ShaderTranslator> fragment_translator_;
- DisallowedExtensions disallowed_extensions_;
+ DisallowedFeatures disallowed_features_;
// Cached from ContextGroup
const Validators* validators_;
@@ -1716,7 +1716,7 @@ bool GLES2DecoderImpl::Initialize(
const scoped_refptr<gfx::GLSurface>& surface,
const scoped_refptr<gfx::GLContext>& context,
const gfx::Size& size,
- const DisallowedExtensions& disallowed_extensions,
+ const DisallowedFeatures& disallowed_features,
const char* allowed_extensions,
const std::vector<int32>& attribs) {
DCHECK(context);
@@ -1739,7 +1739,7 @@ bool GLES2DecoderImpl::Initialize(
return false;
}
- if (!group_->Initialize(disallowed_extensions, allowed_extensions)) {
+ if (!group_->Initialize(disallowed_features, allowed_extensions)) {
LOG(ERROR) << "GpuScheduler::InitializeCommon failed because group "
<< "failed to initialize.";
Destroy();
@@ -1747,7 +1747,7 @@ bool GLES2DecoderImpl::Initialize(
}
CHECK_GL_ERROR();
- disallowed_extensions_ = disallowed_extensions;
+ disallowed_features_ = disallowed_features;
vertex_attrib_manager_.Initialize(group_->max_vertex_attribs());
@@ -1938,7 +1938,7 @@ bool GLES2DecoderImpl::Initialize(
has_arb_robustness_ = context->HasExtension("GL_ARB_robustness");
- if (!disallowed_extensions_.driver_bug_workarounds) {
+ if (!disallowed_features_.driver_bug_workarounds) {
#if defined(OS_MACOSX)
const char* vendor_str = reinterpret_cast<const char*>(
glGetString(GL_VENDOR));
@@ -6726,7 +6726,7 @@ error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM(
const gles2::GetRequestableExtensionsCHROMIUM& c) {
Bucket* bucket = CreateBucket(c.bucket_id);
scoped_ptr<FeatureInfo> info(new FeatureInfo());
- info->Initialize(disallowed_extensions_, NULL);
+ info->Initialize(disallowed_features_, NULL);
bucket->SetFromString(info->extensions().c_str());
return error::kNoError;
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index 0d83c23..00fff76 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -29,8 +29,8 @@ namespace gles2 {
class ContextGroup;
class GLES2Util;
-struct DisallowedExtensions {
- DisallowedExtensions()
+struct DisallowedFeatures {
+ DisallowedFeatures()
: multisampling(false),
driver_bug_workarounds(false) {
}
@@ -73,7 +73,7 @@ class GLES2Decoder : public CommonDecoder {
virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface,
const scoped_refptr<gfx::GLContext>& context,
const gfx::Size& size,
- const DisallowedExtensions& disallowed_extensions,
+ const DisallowedFeatures& disallowed_features,
const char* allowed_extensions,
const std::vector<int32>& attribs) = 0;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
index fa9d43d..8b3ab80 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
@@ -33,7 +33,7 @@ class MockGLES2Decoder : public GLES2Decoder {
bool(const scoped_refptr<gfx::GLSurface>& surface,
const scoped_refptr<gfx::GLContext>& context,
const gfx::Size& size,
- const DisallowedExtensions& disallowed_extensions,
+ const DisallowedFeatures& disallowed_features,
const char* allowed_extensions,
const std::vector<int32>& attribs));
MOCK_METHOD0(Destroy, void());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index eb69e87..7dace75 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -75,9 +75,9 @@ void GLES2DecoderTestBase::InitDecoder(
InSequence sequence;
TestHelper::SetupContextGroupInitExpectations(gl_.get(),
- DisallowedExtensions(), extensions);
+ DisallowedFeatures(), extensions);
- EXPECT_TRUE(group_->Initialize(DisallowedExtensions(), NULL));
+ EXPECT_TRUE(group_->Initialize(DisallowedFeatures(), NULL));
EXPECT_CALL(*gl_, EnableVertexAttribArray(0))
.Times(1)
@@ -182,7 +182,7 @@ void GLES2DecoderTestBase::InitDecoder(
decoder_.reset(GLES2Decoder::Create(group_.get()));
decoder_->Initialize(
- surface_, context_, surface_->GetSize(), DisallowedExtensions(),
+ surface_, context_, surface_->GetSize(), DisallowedFeatures(),
NULL, attribs);
decoder_->set_engine(engine_.get());
diff --git a/gpu/command_buffer/service/test_helper.cc b/gpu/command_buffer/service/test_helper.cc
index e441d6a..4e96d74 100644
--- a/gpu/command_buffer/service/test_helper.cc
+++ b/gpu/command_buffer/service/test_helper.cc
@@ -123,7 +123,7 @@ void TestHelper::SetupTextureManagerInitExpectations(
void TestHelper::SetupContextGroupInitExpectations(
::gfx::MockGLInterface* gl,
- const DisallowedExtensions& disallowed_extensions,
+ const DisallowedFeatures& disallowed_features,
const char* extensions) {
InSequence sequence;
diff --git a/gpu/command_buffer/service/test_helper.h b/gpu/command_buffer/service/test_helper.h
index 16e3e0e..0808712 100644
--- a/gpu/command_buffer/service/test_helper.h
+++ b/gpu/command_buffer/service/test_helper.h
@@ -10,7 +10,7 @@
namespace gpu {
namespace gles2 {
-struct DisallowedExtensions;
+struct DisallowedFeatures;
class TestHelper {
public:
@@ -38,7 +38,7 @@ class TestHelper {
static void SetupContextGroupInitExpectations(
::gfx::MockGLInterface* gl,
- const DisallowedExtensions& disallowed_extensions,
+ const DisallowedFeatures& disallowed_features,
const char* extensions);
static void SetupFeatureInfoInitExpectations(
::gfx::MockGLInterface* gl, const char* extensions);
diff --git a/gpu/demos/framework/window.cc b/gpu/demos/framework/window.cc
index 2fea47b..efae079 100644
--- a/gpu/demos/framework/window.cc
+++ b/gpu/demos/framework/window.cc
@@ -81,7 +81,7 @@ bool Window::CreateRenderContext(gfx::PluginWindowHandle hwnd) {
if (!decoder_->Initialize(surface_.get(),
context_.get(),
gfx::Size(),
- gpu::gles2::DisallowedExtensions(),
+ gpu::gles2::DisallowedFeatures(),
NULL,
attribs)) {
return false;
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index f6016bc..b3cebcc 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -125,7 +125,7 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
if (!decoder_->Initialize(gl_surface_.get(),
gl_context_.get(),
gfx::Size(),
- gpu::gles2::DisallowedExtensions(),
+ gpu::gles2::DisallowedFeatures(),
NULL,
attribs)) {
return EGL_NO_SURFACE;