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

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

Issue 13140006: gpu: Fix Vivante's "hisilicon" GPUs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add FBO restore 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
510 if (CommandLine::ForCurrentProcess()->HasSwitch( 522 if (CommandLine::ForCurrentProcess()->HasSwitch(
511 switches::kEnableGPUServiceLogging)) { 523 switches::kEnableGPUServiceLogging)) {
512 decoder_->set_log_commands(true); 524 decoder_->set_log_commands(true);
513 } 525 }
514 526
515 decoder_->GetLogger()->SetMsgCallback( 527 decoder_->GetLogger()->SetMsgCallback(
516 base::Bind(&GpuCommandBufferStub::SendConsoleMessage, 528 base::Bind(&GpuCommandBufferStub::SendConsoleMessage,
517 base::Unretained(this))); 529 base::Unretained(this)));
518 decoder_->SetShaderCacheCallback( 530 decoder_->SetShaderCacheCallback(
519 base::Bind(&GpuCommandBufferStub::SendCachedShader, 531 base::Bind(&GpuCommandBufferStub::SendCachedShader,
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 if (surface_ && MakeCurrent()) 945 if (surface_ && MakeCurrent())
934 surface_->SetFrontbufferAllocation( 946 surface_->SetFrontbufferAllocation(
935 allocation.browser_allocation.suggest_have_frontbuffer); 947 allocation.browser_allocation.suggest_have_frontbuffer);
936 } 948 }
937 949
938 last_memory_allocation_valid_ = true; 950 last_memory_allocation_valid_ = true;
939 last_memory_allocation_ = allocation; 951 last_memory_allocation_ = allocation;
940 } 952 }
941 953
942 } // namespace content 954 } // 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