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

Side by Side Diff: ui/gl/gl_surface.cc

Issue 13140006: gpu: Fix Vivante's "hisilicon" GPUs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add FBO restore Created 7 years, 8 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 | « ui/gl/gl_surface.h ('k') | ui/gl/gl_surface_egl.h » ('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 "ui/gl/gl_surface.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 bool GLSurface::Initialize() { 78 bool GLSurface::Initialize() {
79 return true; 79 return true;
80 } 80 }
81 81
82 bool GLSurface::Resize(const gfx::Size& size) { 82 bool GLSurface::Resize(const gfx::Size& size) {
83 NOTIMPLEMENTED(); 83 NOTIMPLEMENTED();
84 return false; 84 return false;
85 } 85 }
86 86
87 bool GLSurface::Recreate() {
88 NOTIMPLEMENTED();
89 return false;
90 }
91
87 bool GLSurface::DeferDraws() { 92 bool GLSurface::DeferDraws() {
88 return false; 93 return false;
89 } 94 }
90 95
91 std::string GLSurface::GetExtensions() { 96 std::string GLSurface::GetExtensions() {
92 return std::string(); 97 return std::string();
93 } 98 }
94 99
95 bool GLSurface::HasExtension(const char* name) { 100 bool GLSurface::HasExtension(const char* name) {
96 std::string extensions = GetExtensions(); 101 std::string extensions = GetExtensions();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 143
139 unsigned GLSurface::GetFormat() { 144 unsigned GLSurface::GetFormat() {
140 NOTIMPLEMENTED(); 145 NOTIMPLEMENTED();
141 return 0; 146 return 0;
142 } 147 }
143 148
144 VSyncProvider* GLSurface::GetVSyncProvider() { 149 VSyncProvider* GLSurface::GetVSyncProvider() {
145 return NULL; 150 return NULL;
146 } 151 }
147 152
153 bool GLSurface::RecreateOnMakeCurrent() {
154 return false;
155 }
156
157 void GLSurface::SetRecreateOnMakeCurrent(bool recreate) {
158 }
159
148 GLSurface* GLSurface::GetCurrent() { 160 GLSurface* GLSurface::GetCurrent() {
149 return current_surface_.Pointer()->Get(); 161 return current_surface_.Pointer()->Get();
150 } 162 }
151 163
152 GLSurface::~GLSurface() { 164 GLSurface::~GLSurface() {
153 if (GetCurrent() == this) 165 if (GetCurrent() == this)
154 SetCurrent(NULL); 166 SetCurrent(NULL);
155 } 167 }
156 168
157 void GLSurface::SetCurrent(GLSurface* surface) { 169 void GLSurface::SetCurrent(GLSurface* surface) {
(...skipping 20 matching lines...) Expand all
178 } 190 }
179 191
180 void GLSurfaceAdapter::Destroy() { 192 void GLSurfaceAdapter::Destroy() {
181 surface_->Destroy(); 193 surface_->Destroy();
182 } 194 }
183 195
184 bool GLSurfaceAdapter::Resize(const gfx::Size& size) { 196 bool GLSurfaceAdapter::Resize(const gfx::Size& size) {
185 return surface_->Resize(size); 197 return surface_->Resize(size);
186 } 198 }
187 199
200 bool GLSurfaceAdapter::Recreate() {
201 return surface_->Recreate();
202 }
203
188 bool GLSurfaceAdapter::DeferDraws() { 204 bool GLSurfaceAdapter::DeferDraws() {
189 return surface_->DeferDraws(); 205 return surface_->DeferDraws();
190 } 206 }
191 207
192 bool GLSurfaceAdapter::IsOffscreen() { 208 bool GLSurfaceAdapter::IsOffscreen() {
193 return surface_->IsOffscreen(); 209 return surface_->IsOffscreen();
194 } 210 }
195 211
196 bool GLSurfaceAdapter::SwapBuffers() { 212 bool GLSurfaceAdapter::SwapBuffers() {
197 return surface_->SwapBuffers(); 213 return surface_->SwapBuffers();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 258 }
243 259
244 unsigned GLSurfaceAdapter::GetFormat() { 260 unsigned GLSurfaceAdapter::GetFormat() {
245 return surface_->GetFormat(); 261 return surface_->GetFormat();
246 } 262 }
247 263
248 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() { 264 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() {
249 return surface_->GetVSyncProvider(); 265 return surface_->GetVSyncProvider();
250 } 266 }
251 267
268 bool GLSurfaceAdapter::RecreateOnMakeCurrent() {
269 return surface_->RecreateOnMakeCurrent();
270 }
271
272 void GLSurfaceAdapter::SetRecreateOnMakeCurrent(bool recreate) {
273 surface_->SetRecreateOnMakeCurrent(recreate);
274 }
275
252 GLSurfaceAdapter::~GLSurfaceAdapter() {} 276 GLSurfaceAdapter::~GLSurfaceAdapter() {}
253 277
254 } // namespace gfx 278 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface.h ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698