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

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 2226193002: Not for commit: crash GPU process in glCreateGpuMemoryBufferImageCHROMIUM. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « cc/resources/resource_provider.cc ('k') | content/test/gpu/gpu_tests/gpu_integration_test.py » ('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 "content/gpu/gpu_child_thread.h" 5 #include "content/gpu/gpu_child_thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 protected: 105 protected:
106 ~GpuMemoryBufferMessageFilter() override {} 106 ~GpuMemoryBufferMessageFilter() override {}
107 107
108 void OnCreateGpuMemoryBuffer( 108 void OnCreateGpuMemoryBuffer(
109 const GpuMsg_CreateGpuMemoryBuffer_Params& params) { 109 const GpuMsg_CreateGpuMemoryBuffer_Params& params) {
110 TRACE_EVENT2("gpu", "GpuMemoryBufferMessageFilter::OnCreateGpuMemoryBuffer", 110 TRACE_EVENT2("gpu", "GpuMemoryBufferMessageFilter::OnCreateGpuMemoryBuffer",
111 "id", params.id.id, "client_id", params.client_id); 111 "id", params.id.id, "client_id", params.client_id);
112 112
113 static int numAllocs = 0;
114
115 if (++numAllocs == 8) {
116 volatile int* crash = 0;
117 *crash = 0xDEADBEEF;
118 }
119
113 DCHECK(gpu_memory_buffer_factory_); 120 DCHECK(gpu_memory_buffer_factory_);
114 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated( 121 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated(
115 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer( 122 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(
116 params.id, params.size, params.format, params.usage, 123 params.id, params.size, params.format, params.usage,
117 params.client_id, params.surface_handle))); 124 params.client_id, params.surface_handle)));
118 } 125 }
119 126
120 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 127 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
121 IPC::Sender* sender_; 128 IPC::Sender* sender_;
122 }; 129 };
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 563
557 void GpuChildThread::BindProcessControlRequest( 564 void GpuChildThread::BindProcessControlRequest(
558 mojom::ProcessControlRequest request) { 565 mojom::ProcessControlRequest request) {
559 DVLOG(1) << "GPU: Binding ProcessControl request"; 566 DVLOG(1) << "GPU: Binding ProcessControl request";
560 DCHECK(process_control_); 567 DCHECK(process_control_);
561 process_control_bindings_.AddBinding(process_control_.get(), 568 process_control_bindings_.AddBinding(process_control_.get(),
562 std::move(request)); 569 std::move(request));
563 } 570 }
564 571
565 } // namespace content 572 } // namespace content
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | content/test/gpu/gpu_tests/gpu_integration_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698