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 "android_webview/browser/in_process_renderer/in_process_view_renderer.h
" | 5 #include "android_webview/browser/in_process_renderer/in_process_view_renderer.h
" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 | 8 |
9 #include "android_webview/public/browser/draw_gl.h" | 9 #include "android_webview/public/browser/draw_gl.h" |
10 #include "android_webview/public/browser/draw_sw.h" | 10 #include "android_webview/public/browser/draw_sw.h" |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 } | 567 } |
568 | 568 |
569 void InProcessViewRenderer::Invalidate() { | 569 void InProcessViewRenderer::Invalidate() { |
570 continuous_invalidate_task_pending_ = false; | 570 continuous_invalidate_task_pending_ = false; |
571 if (continuous_invalidate_) | 571 if (continuous_invalidate_) |
572 client_->Invalidate(); | 572 client_->Invalidate(); |
573 } | 573 } |
574 | 574 |
575 void InProcessViewRenderer::EnsureContinuousInvalidation() { | 575 void InProcessViewRenderer::EnsureContinuousInvalidation() { |
576 if (continuous_invalidate_ && !continuous_invalidate_task_pending_) { | 576 if (continuous_invalidate_ && !continuous_invalidate_task_pending_) { |
577 MessageLoop::current()->PostTask(FROM_HERE, | 577 base::MessageLoop::current()->PostTask(FROM_HERE, |
578 base::Bind(&InProcessViewRenderer::Invalidate, | 578 base::Bind(&InProcessViewRenderer::Invalidate, |
579 weak_factory_.GetWeakPtr())); | 579 weak_factory_.GetWeakPtr())); |
580 continuous_invalidate_task_pending_ = true; | 580 continuous_invalidate_task_pending_ = true; |
581 } | 581 } |
582 } | 582 } |
583 | 583 |
584 bool InProcessViewRenderer::RenderSW(SkCanvas* canvas) { | 584 bool InProcessViewRenderer::RenderSW(SkCanvas* canvas) { |
585 // TODO(joth): BrowserViewRendererImpl had a bunch of logic for dpi and page | 585 // TODO(joth): BrowserViewRendererImpl had a bunch of logic for dpi and page |
586 // scale here. Determine what if any needs bringing over to this class. | 586 // scale here. Determine what if any needs bringing over to this class. |
587 return CompositeSW(canvas); | 587 return CompositeSW(canvas); |
588 } | 588 } |
589 | 589 |
590 bool InProcessViewRenderer::CompositeSW(SkCanvas* canvas) { | 590 bool InProcessViewRenderer::CompositeSW(SkCanvas* canvas) { |
591 return compositor_ && compositor_->DemandDrawSw(canvas); | 591 return compositor_ && compositor_->DemandDrawSw(canvas); |
592 } | 592 } |
593 | 593 |
594 } // namespace android_webview | 594 } // namespace android_webview |
OLD | NEW |