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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 14241009: Revert "gpu: Fix Vivante's "hisilicon" GPUs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@HUAWEI_fix_black_fix_var
Patch Set: Created 7 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
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 !surface_id(), 500 !surface_id(),
501 initial_size_, 501 initial_size_,
502 disallowed_features_, 502 disallowed_features_,
503 allowed_extensions_.c_str(), 503 allowed_extensions_.c_str(),
504 requested_attribs_)) { 504 requested_attribs_)) {
505 DLOG(ERROR) << "Failed to initialize decoder."; 505 DLOG(ERROR) << "Failed to initialize decoder.";
506 OnInitializeFailed(reply_message); 506 OnInitializeFailed(reply_message);
507 return; 507 return;
508 } 508 }
509 509
510 // TODO(epenner): If we can initialize the feature-info earlier,
511 // this code can be removed and done only during surface creation.
512 // This code is only needed for the very first surface, which is
513 // created before the ContextGroup is initialized.
514 if (context_group_->feature_info()->workarounds()
515 .makecurrent_recreates_surfaces) {
516 // This only works with virtual contexts!
517 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(
518 switches::kEnableVirtualGLContexts));
519 surface_->SetRecreateOnMakeCurrent(true);
520 }
521
522 if (CommandLine::ForCurrentProcess()->HasSwitch( 510 if (CommandLine::ForCurrentProcess()->HasSwitch(
523 switches::kEnableGPUServiceLogging)) { 511 switches::kEnableGPUServiceLogging)) {
524 decoder_->set_log_commands(true); 512 decoder_->set_log_commands(true);
525 } 513 }
526 514
527 decoder_->GetLogger()->SetMsgCallback( 515 decoder_->GetLogger()->SetMsgCallback(
528 base::Bind(&GpuCommandBufferStub::SendConsoleMessage, 516 base::Bind(&GpuCommandBufferStub::SendConsoleMessage,
529 base::Unretained(this))); 517 base::Unretained(this)));
530 decoder_->SetShaderCacheCallback( 518 decoder_->SetShaderCacheCallback(
531 base::Bind(&GpuCommandBufferStub::SendCachedShader, 519 base::Bind(&GpuCommandBufferStub::SendCachedShader,
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 if (surface_ && MakeCurrent()) 933 if (surface_ && MakeCurrent())
946 surface_->SetFrontbufferAllocation( 934 surface_->SetFrontbufferAllocation(
947 allocation.browser_allocation.suggest_have_frontbuffer); 935 allocation.browser_allocation.suggest_have_frontbuffer);
948 } 936 }
949 937
950 last_memory_allocation_valid_ = true; 938 last_memory_allocation_valid_ = true;
951 last_memory_allocation_ = allocation; 939 last_memory_allocation_ = allocation;
952 } 940 }
953 941
954 } // namespace content 942 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698