| 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_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 class GLHelperHolder | 123 class GLHelperHolder |
| 124 : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback { | 124 : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback { |
| 125 public: | 125 public: |
| 126 static GLHelperHolder* Create(); | 126 static GLHelperHolder* Create(); |
| 127 ~GLHelperHolder() override; | 127 ~GLHelperHolder() override; |
| 128 | 128 |
| 129 void Initialize(); | 129 void Initialize(); |
| 130 | 130 |
| 131 // WebGraphicsContextLostCallback implementation. | 131 // WebGraphicsContextLostCallback implementation. |
| 132 virtual void onContextLost() override; | 132 void onContextLost() override; |
| 133 | 133 |
| 134 GLHelper* GetGLHelper() { return gl_helper_.get(); } | 134 GLHelper* GetGLHelper() { return gl_helper_.get(); } |
| 135 bool IsLost() { return !context_.get() || context_->isContextLost(); } | 135 bool IsLost() { return !context_.get() || context_->isContextLost(); } |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 GLHelperHolder(); | 138 GLHelperHolder(); |
| 139 static scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContext3D(); | 139 static scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContext3D(); |
| 140 | 140 |
| 141 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; | 141 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; |
| 142 scoped_ptr<GLHelper> gl_helper_; | 142 scoped_ptr<GLHelper> gl_helper_; |
| (...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2076 results->orientationAngle = display.RotationAsDegree(); | 2076 results->orientationAngle = display.RotationAsDegree(); |
| 2077 results->orientationType = | 2077 results->orientationType = |
| 2078 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2078 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2079 gfx::DeviceDisplayInfo info; | 2079 gfx::DeviceDisplayInfo info; |
| 2080 results->depth = info.GetBitsPerPixel(); | 2080 results->depth = info.GetBitsPerPixel(); |
| 2081 results->depthPerComponent = info.GetBitsPerComponent(); | 2081 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2082 results->isMonochrome = (results->depthPerComponent == 0); | 2082 results->isMonochrome = (results->depthPerComponent == 0); |
| 2083 } | 2083 } |
| 2084 | 2084 |
| 2085 } // namespace content | 2085 } // namespace content |
| OLD | NEW |