Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 1790753002: Expose GLES2Interface to blink, and delete isContextLost() from WGC3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wgc3d: deps-for-tests Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 public: 121 public:
122 static GLHelperHolder* Create(); 122 static GLHelperHolder* Create();
123 ~GLHelperHolder() override; 123 ~GLHelperHolder() override;
124 124
125 void Initialize(); 125 void Initialize();
126 126
127 // WebGraphicsContextLostCallback implementation. 127 // WebGraphicsContextLostCallback implementation.
128 void onContextLost() override; 128 void onContextLost() override;
129 129
130 GLHelper* GetGLHelper() { return gl_helper_.get(); } 130 GLHelper* GetGLHelper() { return gl_helper_.get(); }
131 bool IsLost() { return !context_.get() || context_->isContextLost(); } 131 bool IsLost() {
132 return !context_ ||
133 context_->GetGLInterface()->GetGraphicsResetStatusKHR() !=
134 GL_NO_ERROR;
135 }
132 136
133 private: 137 private:
134 GLHelperHolder(); 138 GLHelperHolder();
135 static scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContext3D(); 139 static scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContext3D();
136 140
137 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; 141 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_;
138 scoped_ptr<GLHelper> gl_helper_; 142 scoped_ptr<GLHelper> gl_helper_;
139 143
140 DISALLOW_COPY_AND_ASSIGN(GLHelperHolder); 144 DISALLOW_COPY_AND_ASSIGN(GLHelperHolder);
141 }; 145 };
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 results->orientationAngle = display.RotationAsDegree(); 2025 results->orientationAngle = display.RotationAsDegree();
2022 results->orientationType = 2026 results->orientationType =
2023 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2027 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2024 gfx::DeviceDisplayInfo info; 2028 gfx::DeviceDisplayInfo info;
2025 results->depth = info.GetBitsPerPixel(); 2029 results->depth = info.GetBitsPerPixel();
2026 results->depthPerComponent = info.GetBitsPerComponent(); 2030 results->depthPerComponent = info.GetBitsPerComponent();
2027 results->isMonochrome = (results->depthPerComponent == 0); 2031 results->isMonochrome = (results->depthPerComponent == 0);
2028 } 2032 }
2029 2033
2030 } // namespace content 2034 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698