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

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 recreate work-around 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
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
148 GLSurface* GLSurface::GetCurrent() { 157 GLSurface* GLSurface::GetCurrent() {
149 return current_surface_.Pointer()->Get(); 158 return current_surface_.Pointer()->Get();
150 } 159 }
151 160
152 GLSurface::~GLSurface() { 161 GLSurface::~GLSurface() {
153 if (GetCurrent() == this) 162 if (GetCurrent() == this)
154 SetCurrent(NULL); 163 SetCurrent(NULL);
155 } 164 }
156 165
157 void GLSurface::SetCurrent(GLSurface* surface) { 166 void GLSurface::SetCurrent(GLSurface* surface) {
(...skipping 20 matching lines...) Expand all
178 } 187 }
179 188
180 void GLSurfaceAdapter::Destroy() { 189 void GLSurfaceAdapter::Destroy() {
181 surface_->Destroy(); 190 surface_->Destroy();
182 } 191 }
183 192
184 bool GLSurfaceAdapter::Resize(const gfx::Size& size) { 193 bool GLSurfaceAdapter::Resize(const gfx::Size& size) {
185 return surface_->Resize(size); 194 return surface_->Resize(size);
186 } 195 }
187 196
197 bool GLSurfaceAdapter::Recreate() {
198 return surface_->Recreate();
199 }
200
188 bool GLSurfaceAdapter::DeferDraws() { 201 bool GLSurfaceAdapter::DeferDraws() {
189 return surface_->DeferDraws(); 202 return surface_->DeferDraws();
190 } 203 }
191 204
192 bool GLSurfaceAdapter::IsOffscreen() { 205 bool GLSurfaceAdapter::IsOffscreen() {
193 return surface_->IsOffscreen(); 206 return surface_->IsOffscreen();
194 } 207 }
195 208
196 bool GLSurfaceAdapter::SwapBuffers() { 209 bool GLSurfaceAdapter::SwapBuffers() {
197 return surface_->SwapBuffers(); 210 return surface_->SwapBuffers();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 255 }
243 256
244 unsigned GLSurfaceAdapter::GetFormat() { 257 unsigned GLSurfaceAdapter::GetFormat() {
245 return surface_->GetFormat(); 258 return surface_->GetFormat();
246 } 259 }
247 260
248 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() { 261 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() {
249 return surface_->GetVSyncProvider(); 262 return surface_->GetVSyncProvider();
250 } 263 }
251 264
265 bool GLSurfaceAdapter::RecreateOnMakeCurrent() {
266 return surface_->RecreateOnMakeCurrent();
267 }
268
252 GLSurfaceAdapter::~GLSurfaceAdapter() {} 269 GLSurfaceAdapter::~GLSurfaceAdapter() {}
253 270
254 } // namespace gfx 271 } // namespace gfx
OLDNEW
« ui/gl/gl_context_egl.cc ('K') | « 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