| 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 "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/hash.h" | 8 #include "base/hash.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Prevents idle work from being starved. | 111 // Prevents idle work from being starved. |
| 112 const int64 kMaxTimeSinceIdleMs = 10; | 112 const int64 kMaxTimeSinceIdleMs = 10; |
| 113 | 113 |
| 114 class DevToolsChannelData : public base::trace_event::ConvertableToTraceFormat { | 114 class DevToolsChannelData : public base::trace_event::ConvertableToTraceFormat { |
| 115 public: | 115 public: |
| 116 static scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 116 static scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
| 117 CreateForChannel(GpuChannel* channel); | 117 CreateForChannel(GpuChannel* channel); |
| 118 | 118 |
| 119 void AppendAsTraceFormat(std::string* out) const override { | 119 void AppendAsTraceFormat(std::string* out) const override { |
| 120 std::string tmp; | 120 std::string tmp; |
| 121 base::JSONWriter::Write(value_.get(), &tmp); | 121 base::JSONWriter::Write(*value_, &tmp); |
| 122 *out += tmp; | 122 *out += tmp; |
| 123 } | 123 } |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 explicit DevToolsChannelData(base::Value* value) : value_(value) {} | 126 explicit DevToolsChannelData(base::Value* value) : value_(value) {} |
| 127 ~DevToolsChannelData() override {} | 127 ~DevToolsChannelData() override {} |
| 128 scoped_ptr<base::Value> value_; | 128 scoped_ptr<base::Value> value_; |
| 129 DISALLOW_COPY_AND_ASSIGN(DevToolsChannelData); | 129 DISALLOW_COPY_AND_ASSIGN(DevToolsChannelData); |
| 130 }; | 130 }; |
| 131 | 131 |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); | 1112 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, | 1115 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, |
| 1116 base::TimeDelta interval) { | 1116 base::TimeDelta interval) { |
| 1117 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, | 1117 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, |
| 1118 interval)); | 1118 interval)); |
| 1119 } | 1119 } |
| 1120 | 1120 |
| 1121 } // namespace content | 1121 } // namespace content |
| OLD | NEW |