| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/renderer/gpu/compositor_software_output_device.h" | 5 #include "content/renderer/gpu/compositor_software_output_device.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "cc/output/software_frame_data.h" | 8 #include "cc/output/software_frame_data.h" |
| 9 #include "content/renderer/render_process.h" | 9 #include "content/renderer/render_process.h" |
| 10 #include "third_party/skia/include/core/SkBitmapDevice.h" | 10 #include "third_party/skia/include/core/SkBitmapDevice.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 buffers_[i] = NULL; | 124 buffers_[i] = NULL; |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 buffers_.clear(); | 127 buffers_.clear(); |
| 128 current_index_ = -1; | 128 current_index_ = -1; |
| 129 } | 129 } |
| 130 | 130 |
| 131 void CompositorSoftwareOutputDevice::EnsureBackbuffer() { | 131 void CompositorSoftwareOutputDevice::EnsureBackbuffer() { |
| 132 } | 132 } |
| 133 | 133 |
| 134 SkCanvas* CompositorSoftwareOutputDevice::BeginPaint(gfx::Rect damage_rect) { | 134 SkCanvas* CompositorSoftwareOutputDevice::BeginPaint( |
| 135 const gfx::Rect& damage_rect) { |
| 135 DCHECK(CalledOnValidThread()); | 136 DCHECK(CalledOnValidThread()); |
| 136 | 137 |
| 137 Buffer* previous = NULL; | 138 Buffer* previous = NULL; |
| 138 if (current_index_ != size_t(-1)) | 139 if (current_index_ != size_t(-1)) |
| 139 previous = buffers_[current_index_]; | 140 previous = buffers_[current_index_]; |
| 140 current_index_ = FindFreeBuffer(current_index_ + 1); | 141 current_index_ = FindFreeBuffer(current_index_ + 1); |
| 141 Buffer* current = buffers_[current_index_]; | 142 Buffer* current = buffers_[current_index_]; |
| 142 DCHECK(current->free()); | 143 DCHECK(current->free()); |
| 143 current->SetFree(false); | 144 current->SetFree(false); |
| 144 | 145 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 return; | 223 return; |
| 223 } else { | 224 } else { |
| 224 it = std::find_if(awaiting_ack_.begin(), awaiting_ack_.end(), | 225 it = std::find_if(awaiting_ack_.begin(), awaiting_ack_.end(), |
| 225 CompareById(id)); | 226 CompareById(id)); |
| 226 DCHECK(it != awaiting_ack_.end()); | 227 DCHECK(it != awaiting_ack_.end()); |
| 227 awaiting_ack_.erase(it); | 228 awaiting_ack_.erase(it); |
| 228 } | 229 } |
| 229 } | 230 } |
| 230 | 231 |
| 231 } // namespace content | 232 } // namespace content |
| OLD | NEW |