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/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 SkRegion damage(RectToSkIRect(damage_rect)); | 1662 SkRegion damage(RectToSkIRect(damage_rect)); |
1663 if (!skipped_damage_.isEmpty()) { | 1663 if (!skipped_damage_.isEmpty()) { |
1664 damage.op(skipped_damage_, SkRegion::kUnion_Op); | 1664 damage.op(skipped_damage_, SkRegion::kUnion_Op); |
1665 skipped_damage_.setEmpty(); | 1665 skipped_damage_.setEmpty(); |
1666 } | 1666 } |
1667 | 1667 |
1668 DCHECK(surface_rect.Contains(SkIRectToRect(damage.getBounds()))); | 1668 DCHECK(surface_rect.Contains(SkIRectToRect(damage.getBounds()))); |
1669 ui::Texture* current_texture = current_surface_.get(); | 1669 ui::Texture* current_texture = current_surface_.get(); |
1670 | 1670 |
1671 const gfx::Size surface_size_in_pixel = surface_size; | 1671 const gfx::Size surface_size_in_pixel = surface_size; |
1672 DLOG_IF(ERROR, previous_texture && | 1672 DLOG_IF(ERROR, previous_texture.get() && |
1673 previous_texture->size() != current_texture->size() && | 1673 previous_texture->size() != current_texture->size() && |
1674 SkIRectToRect(damage.getBounds()) != surface_rect) << | 1674 SkIRectToRect(damage.getBounds()) != surface_rect) << |
1675 "Expected full damage rect after size change"; | 1675 "Expected full damage rect after size change"; |
1676 if (previous_texture.get() && !previous_damage_.isEmpty() && | 1676 if (previous_texture.get() && !previous_damage_.isEmpty() && |
1677 previous_texture->size() == current_texture->size()) { | 1677 previous_texture->size() == current_texture->size()) { |
1678 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 1678 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
1679 GLHelper* gl_helper = factory->GetGLHelper(); | 1679 GLHelper* gl_helper = factory->GetGLHelper(); |
1680 gl_helper->CopySubBufferDamage( | 1680 gl_helper->CopySubBufferDamage( |
1681 current_texture->PrepareTexture(), | 1681 current_texture->PrepareTexture(), |
1682 previous_texture->PrepareTexture(), | 1682 previous_texture->PrepareTexture(), |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3012 RenderWidgetHost* widget) { | 3012 RenderWidgetHost* widget) { |
3013 return new RenderWidgetHostViewAura(widget); | 3013 return new RenderWidgetHostViewAura(widget); |
3014 } | 3014 } |
3015 | 3015 |
3016 // static | 3016 // static |
3017 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3017 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
3018 GetScreenInfoForWindow(results, NULL); | 3018 GetScreenInfoForWindow(results, NULL); |
3019 } | 3019 } |
3020 | 3020 |
3021 } // namespace content | 3021 } // namespace content |
OLD | NEW |