Chromium Code Reviews| 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 "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 398 | 398 |
| 399 paint_aggregator_.ClearPendingUpdate(); | 399 paint_aggregator_.ClearPendingUpdate(); |
| 400 | 400 |
| 401 // When resizing, we want to wait to paint before ACK'ing the resize. This | 401 // When resizing, we want to wait to paint before ACK'ing the resize. This |
| 402 // ensures that we only resize as fast as we can paint. We only need to | 402 // ensures that we only resize as fast as we can paint. We only need to |
| 403 // send an ACK if we are resized to a non-empty rect. | 403 // send an ACK if we are resized to a non-empty rect. |
| 404 webwidget_->resize(new_size); | 404 webwidget_->resize(new_size); |
| 405 | 405 |
| 406 // Resize should have caused an invalidation of the entire view. | 406 // Resize should have caused an invalidation of the entire view. |
| 407 DCHECK(new_size.IsEmpty() || is_accelerated_compositing_active_ || | 407 DCHECK(new_size.IsEmpty() || is_accelerated_compositing_active_ || |
| 408 paint_aggregator_.HasPendingUpdate()); | 408 auto_resize_mode_ || paint_aggregator_.HasPendingUpdate()); |
|
piman
2013/05/14 19:27:37
This looks wrong. Why wouldn't we get an invalidat
jochen (gone - plz use gerrit)
2013/05/21 13:49:11
oh well
because I abused the didAutoResize() call
| |
| 409 } else if (!RenderThreadImpl::current()->short_circuit_size_updates()) { | 409 } else if (!RenderThreadImpl::current()->short_circuit_size_updates()) { |
| 410 resize_ack = NO_RESIZE_ACK; | 410 resize_ack = NO_RESIZE_ACK; |
| 411 } | 411 } |
| 412 | 412 |
| 413 // Send the Resize_ACK flag once we paint again if requested. | 413 // Send the Resize_ACK flag once we paint again if requested. |
| 414 if (resize_ack == SEND_RESIZE_ACK && !new_size.IsEmpty()) | 414 if (resize_ack == SEND_RESIZE_ACK && !new_size.IsEmpty()) |
| 415 set_next_paint_is_resize_ack(); | 415 set_next_paint_is_resize_ack(); |
| 416 | 416 |
| 417 if (fullscreen_change) | 417 if (fullscreen_change) |
| 418 DidToggleFullscreen(); | 418 DidToggleFullscreen(); |
| (...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2346 | 2346 |
| 2347 if (!context->Initialize( | 2347 if (!context->Initialize( |
| 2348 attributes, | 2348 attributes, |
| 2349 false /* bind generates resources */, | 2349 false /* bind generates resources */, |
| 2350 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) | 2350 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) |
| 2351 return NULL; | 2351 return NULL; |
| 2352 return context.release(); | 2352 return context.release(); |
| 2353 } | 2353 } |
| 2354 | 2354 |
| 2355 } // namespace content | 2355 } // namespace content |
| OLD | NEW |