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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months 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 unified diff | Download patch
OLDNEW
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 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 TextureRef* dest_texture_ref); 1874 TextureRef* dest_texture_ref);
1875 1875
1876 void RenderWarning(const char* filename, int line, const std::string& msg); 1876 void RenderWarning(const char* filename, int line, const std::string& msg);
1877 void PerformanceWarning( 1877 void PerformanceWarning(
1878 const char* filename, int line, const std::string& msg); 1878 const char* filename, int line, const std::string& msg);
1879 1879
1880 const FeatureInfo::FeatureFlags& features() const { 1880 const FeatureInfo::FeatureFlags& features() const {
1881 return feature_info_->feature_flags(); 1881 return feature_info_->feature_flags();
1882 } 1882 }
1883 1883
1884 const FeatureInfo::Workarounds& workarounds() const { 1884 const GpuDriverBugWorkarounds& workarounds() const {
1885 return feature_info_->workarounds(); 1885 return feature_info_->workarounds();
1886 } 1886 }
1887 1887
1888 bool ShouldDeferDraws() { 1888 bool ShouldDeferDraws() {
1889 return !offscreen_target_frame_buffer_.get() && 1889 return !offscreen_target_frame_buffer_.get() &&
1890 framebuffer_state_.bound_draw_framebuffer.get() == NULL && 1890 framebuffer_state_.bound_draw_framebuffer.get() == NULL &&
1891 surface_->DeferDraws(); 1891 surface_->DeferDraws();
1892 } 1892 }
1893 1893
1894 bool ShouldDeferReads() { 1894 bool ShouldDeferReads() {
(...skipping 11069 matching lines...) Expand 10 before | Expand all | Expand 10 after
12964 return error::kNoError; 12964 return error::kNoError;
12965 } 12965 }
12966 12966
12967 error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM( 12967 error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM(
12968 uint32_t immediate_data_size, 12968 uint32_t immediate_data_size,
12969 const void* cmd_data) { 12969 const void* cmd_data) {
12970 const gles2::cmds::GetRequestableExtensionsCHROMIUM& c = 12970 const gles2::cmds::GetRequestableExtensionsCHROMIUM& c =
12971 *static_cast<const gles2::cmds::GetRequestableExtensionsCHROMIUM*>( 12971 *static_cast<const gles2::cmds::GetRequestableExtensionsCHROMIUM*>(
12972 cmd_data); 12972 cmd_data);
12973 Bucket* bucket = CreateBucket(c.bucket_id); 12973 Bucket* bucket = CreateBucket(c.bucket_id);
12974 scoped_refptr<FeatureInfo> info(new FeatureInfo()); 12974 scoped_refptr<FeatureInfo> info(new FeatureInfo(workarounds()));
12975 DisallowedFeatures disallowed_features = feature_info_->disallowed_features(); 12975 DisallowedFeatures disallowed_features = feature_info_->disallowed_features();
12976 disallowed_features.AllowExtensions(); 12976 disallowed_features.AllowExtensions();
12977 info->Initialize(feature_info_->context_type(), disallowed_features); 12977 info->Initialize(feature_info_->context_type(), disallowed_features);
12978 bucket->SetFromString(info->extensions().c_str()); 12978 bucket->SetFromString(info->extensions().c_str());
12979 return error::kNoError; 12979 return error::kNoError;
12980 } 12980 }
12981 12981
12982 error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM( 12982 error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM(
12983 uint32_t immediate_data_size, 12983 uint32_t immediate_data_size,
12984 const void* cmd_data) { 12984 const void* cmd_data) {
(...skipping 3527 matching lines...) Expand 10 before | Expand all | Expand 10 after
16512 } 16512 }
16513 16513
16514 // Include the auto-generated part of this file. We split this because it means 16514 // Include the auto-generated part of this file. We split this because it means
16515 // we can easily edit the non-auto generated parts right here in this file 16515 // we can easily edit the non-auto generated parts right here in this file
16516 // instead of having to edit some template or the code generator. 16516 // instead of having to edit some template or the code generator.
16517 #include "base/macros.h" 16517 #include "base/macros.h"
16518 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 16518 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
16519 16519
16520 } // namespace gles2 16520 } // namespace gles2
16521 } // namespace gpu 16521 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698