OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1847 TextureRef* dest_texture_ref); | 1847 TextureRef* dest_texture_ref); |
1848 | 1848 |
1849 void RenderWarning(const char* filename, int line, const std::string& msg); | 1849 void RenderWarning(const char* filename, int line, const std::string& msg); |
1850 void PerformanceWarning( | 1850 void PerformanceWarning( |
1851 const char* filename, int line, const std::string& msg); | 1851 const char* filename, int line, const std::string& msg); |
1852 | 1852 |
1853 const FeatureInfo::FeatureFlags& features() const { | 1853 const FeatureInfo::FeatureFlags& features() const { |
1854 return feature_info_->feature_flags(); | 1854 return feature_info_->feature_flags(); |
1855 } | 1855 } |
1856 | 1856 |
1857 const FeatureInfo::Workarounds& workarounds() const { | 1857 const GpuDriverBugWorkarounds& workarounds() const { |
1858 return feature_info_->workarounds(); | 1858 return feature_info_->workarounds(); |
1859 } | 1859 } |
1860 | 1860 |
1861 bool ShouldDeferDraws() { | 1861 bool ShouldDeferDraws() { |
1862 return !offscreen_target_frame_buffer_.get() && | 1862 return !offscreen_target_frame_buffer_.get() && |
1863 framebuffer_state_.bound_draw_framebuffer.get() == NULL && | 1863 framebuffer_state_.bound_draw_framebuffer.get() == NULL && |
1864 surface_->DeferDraws(); | 1864 surface_->DeferDraws(); |
1865 } | 1865 } |
1866 | 1866 |
1867 bool ShouldDeferReads() { | 1867 bool ShouldDeferReads() { |
(...skipping 10983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12851 return error::kNoError; | 12851 return error::kNoError; |
12852 } | 12852 } |
12853 | 12853 |
12854 error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM( | 12854 error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM( |
12855 uint32_t immediate_data_size, | 12855 uint32_t immediate_data_size, |
12856 const void* cmd_data) { | 12856 const void* cmd_data) { |
12857 const gles2::cmds::GetRequestableExtensionsCHROMIUM& c = | 12857 const gles2::cmds::GetRequestableExtensionsCHROMIUM& c = |
12858 *static_cast<const gles2::cmds::GetRequestableExtensionsCHROMIUM*>( | 12858 *static_cast<const gles2::cmds::GetRequestableExtensionsCHROMIUM*>( |
12859 cmd_data); | 12859 cmd_data); |
12860 Bucket* bucket = CreateBucket(c.bucket_id); | 12860 Bucket* bucket = CreateBucket(c.bucket_id); |
12861 scoped_refptr<FeatureInfo> info(new FeatureInfo()); | 12861 scoped_refptr<FeatureInfo> info(new FeatureInfo(workarounds())); |
12862 DisallowedFeatures disallowed_features = feature_info_->disallowed_features(); | 12862 DisallowedFeatures disallowed_features = feature_info_->disallowed_features(); |
12863 disallowed_features.AllowExtensions(); | 12863 disallowed_features.AllowExtensions(); |
12864 info->Initialize(feature_info_->context_type(), disallowed_features); | 12864 info->Initialize(feature_info_->context_type(), disallowed_features); |
12865 bucket->SetFromString(info->extensions().c_str()); | 12865 bucket->SetFromString(info->extensions().c_str()); |
12866 return error::kNoError; | 12866 return error::kNoError; |
12867 } | 12867 } |
12868 | 12868 |
12869 error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM( | 12869 error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM( |
12870 uint32_t immediate_data_size, | 12870 uint32_t immediate_data_size, |
12871 const void* cmd_data) { | 12871 const void* cmd_data) { |
(...skipping 3505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16377 } | 16377 } |
16378 | 16378 |
16379 // Include the auto-generated part of this file. We split this because it means | 16379 // Include the auto-generated part of this file. We split this because it means |
16380 // we can easily edit the non-auto generated parts right here in this file | 16380 // we can easily edit the non-auto generated parts right here in this file |
16381 // instead of having to edit some template or the code generator. | 16381 // instead of having to edit some template or the code generator. |
16382 #include "base/macros.h" | 16382 #include "base/macros.h" |
16383 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 16383 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
16384 | 16384 |
16385 } // namespace gles2 | 16385 } // namespace gles2 |
16386 } // namespace gpu | 16386 } // namespace gpu |
OLD | NEW |