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/compositor_impl_android.h" | 5 #include "content/browser/renderer_host/compositor_impl_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 // Used for drawing directly to the screen. Bypasses resizing and swaps. | 54 // Used for drawing directly to the screen. Bypasses resizing and swaps. |
55 class DirectOutputSurface : public cc::OutputSurface { | 55 class DirectOutputSurface : public cc::OutputSurface { |
56 public: | 56 public: |
57 DirectOutputSurface( | 57 DirectOutputSurface( |
58 const scoped_refptr<cc::ContextProvider>& context_provider) | 58 const scoped_refptr<cc::ContextProvider>& context_provider) |
59 : cc::OutputSurface(context_provider) { | 59 : cc::OutputSurface(context_provider) { |
60 capabilities_.adjust_deadline_for_parent = false; | 60 capabilities_.adjust_deadline_for_parent = false; |
61 } | 61 } |
62 | 62 |
63 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE { | 63 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE { |
64 surface_size_ = size; | 64 surface_size_ = size; |
65 } | 65 } |
66 virtual void SwapBuffers(cc::CompositorFrame*) OVERRIDE { | 66 virtual void SwapBuffers(cc::CompositorFrame*) OVERRIDE { |
67 context_provider_->ContextGL()->ShallowFlushCHROMIUM(); | 67 context_provider_->ContextGL()->ShallowFlushCHROMIUM(); |
68 } | 68 } |
69 }; | 69 }; |
70 | 70 |
71 // Used to override capabilities_.adjust_deadline_for_parent to false | 71 // Used to override capabilities_.adjust_deadline_for_parent to false |
72 class OutputSurfaceWithoutParent : public cc::OutputSurface { | 72 class OutputSurfaceWithoutParent : public cc::OutputSurface { |
73 public: | 73 public: |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 default: | 488 default: |
489 return GL_UNSIGNED_SHORT_5_6_5; | 489 return GL_UNSIGNED_SHORT_5_6_5; |
490 } | 490 } |
491 } | 491 } |
492 | 492 |
493 void CompositorImpl::DidCommit() { | 493 void CompositorImpl::DidCommit() { |
494 root_window_->OnCompositingDidCommit(); | 494 root_window_->OnCompositingDidCommit(); |
495 } | 495 } |
496 | 496 |
497 } // namespace content | 497 } // namespace content |
OLD | NEW |