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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 13863015: Add flag for drawing layers to screen with Ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use kTopLeft Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 24 matching lines...) Expand all
35 #include "cc/trees/damage_tracker.h" 35 #include "cc/trees/damage_tracker.h"
36 #include "cc/trees/proxy.h" 36 #include "cc/trees/proxy.h"
37 #include "cc/trees/single_thread_proxy.h" 37 #include "cc/trees/single_thread_proxy.h"
38 #include "gpu/GLES2/gl2extchromium.h" 38 #include "gpu/GLES2/gl2extchromium.h"
39 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 39 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
40 #include "third_party/khronos/GLES2/gl2.h" 40 #include "third_party/khronos/GLES2/gl2.h"
41 #include "third_party/khronos/GLES2/gl2ext.h" 41 #include "third_party/khronos/GLES2/gl2ext.h"
42 #include "third_party/skia/include/core/SkBitmap.h" 42 #include "third_party/skia/include/core/SkBitmap.h"
43 #include "third_party/skia/include/core/SkColor.h" 43 #include "third_party/skia/include/core/SkColor.h"
44 #include "third_party/skia/include/core/SkColorFilter.h" 44 #include "third_party/skia/include/core/SkColorFilter.h"
45 #include "third_party/skia/include/core/SkSurface.h"
45 #include "third_party/skia/include/gpu/GrContext.h" 46 #include "third_party/skia/include/gpu/GrContext.h"
46 #include "third_party/skia/include/gpu/GrTexture.h" 47 #include "third_party/skia/include/gpu/GrTexture.h"
47 #include "third_party/skia/include/gpu/SkGpuDevice.h" 48 #include "third_party/skia/include/gpu/SkGpuDevice.h"
48 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h" 49 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h"
50 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
49 #include "ui/gfx/quad_f.h" 51 #include "ui/gfx/quad_f.h"
50 #include "ui/gfx/rect_conversions.h" 52 #include "ui/gfx/rect_conversions.h"
51 53
52 using WebKit::WebGraphicsContext3D; 54 using WebKit::WebGraphicsContext3D;
53 using WebKit::WebGraphicsMemoryAllocation; 55 using WebKit::WebGraphicsMemoryAllocation;
54 56
55 namespace cc { 57 namespace cc {
56 58
57 namespace { 59 namespace {
58 60
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 base::CancelableClosure finished_read_pixels_callback; 98 base::CancelableClosure finished_read_pixels_callback;
97 unsigned buffer; 99 unsigned buffer;
98 100
99 private: 101 private:
100 DISALLOW_COPY_AND_ASSIGN(PendingAsyncReadPixels); 102 DISALLOW_COPY_AND_ASSIGN(PendingAsyncReadPixels);
101 }; 103 };
102 104
103 scoped_ptr<GLRenderer> GLRenderer::Create(RendererClient* client, 105 scoped_ptr<GLRenderer> GLRenderer::Create(RendererClient* client,
104 OutputSurface* output_surface, 106 OutputSurface* output_surface,
105 ResourceProvider* resource_provider, 107 ResourceProvider* resource_provider,
106 int highp_threshold_min) { 108 int highp_threshold_min,
109 bool use_ganesh) {
107 scoped_ptr<GLRenderer> renderer(new GLRenderer( 110 scoped_ptr<GLRenderer> renderer(new GLRenderer(
108 client, output_surface, resource_provider, highp_threshold_min)); 111 client, output_surface, resource_provider, highp_threshold_min));
109 if (!renderer->Initialize()) 112 if (!renderer->Initialize())
110 return scoped_ptr<GLRenderer>(); 113 return scoped_ptr<GLRenderer>();
114 if (use_ganesh)
115 renderer->InitializeGrContext();
111 116
112 return renderer.Pass(); 117 return renderer.Pass();
113 } 118 }
114 119
115 GLRenderer::GLRenderer(RendererClient* client, 120 GLRenderer::GLRenderer(RendererClient* client,
116 OutputSurface* output_surface, 121 OutputSurface* output_surface,
117 ResourceProvider* resource_provider, 122 ResourceProvider* resource_provider,
118 int highp_threshold_min) 123 int highp_threshold_min)
119 : DirectRenderer(client, resource_provider), 124 : DirectRenderer(client, resource_provider),
120 offscreen_framebuffer_id_(0), 125 offscreen_framebuffer_id_(0),
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // Check for texture fast paths. Currently we always use MO8 textures, 191 // Check for texture fast paths. Currently we always use MO8 textures,
187 // so we only need to avoid POT textures if we have an NPOT fast-path. 192 // so we only need to avoid POT textures if we have an NPOT fast-path.
188 capabilities_.avoid_pow2_textures = 193 capabilities_.avoid_pow2_textures =
189 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; 194 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0;
190 195
191 capabilities_.using_offscreen_context3d = true; 196 capabilities_.using_offscreen_context3d = true;
192 197
193 is_using_bind_uniform_ = 198 is_using_bind_uniform_ =
194 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0; 199 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0;
195 200
196 // Make sure scissoring starts as disabled.
197 GLC(context_, context_->disable(GL_SCISSOR_TEST));
198 DCHECK(!is_scissor_enabled_);
199
200 if (!InitializeSharedObjects()) 201 if (!InitializeSharedObjects())
201 return false; 202 return false;
202 203
203 // Make sure the viewport and context gets initialized, even if it is to zero. 204 // Make sure the viewport and context gets initialized, even if it is to zero.
204 ViewportChanged(); 205 ViewportChanged();
205 return true; 206 return true;
206 } 207 }
207 208
209 void GLRenderer::InitializeGrContext() {
210 skia::RefPtr<GrGLInterface> interface = skia::AdoptRef(
211 context_->createGrGLInterface());
212 if (!interface)
213 return;
214
215 gr_context_ = skia::AdoptRef(GrContext::Create(
216 kOpenGL_GrBackend,
217 reinterpret_cast<GrBackendContext>(interface.get())));
218 ReinitializeGrCanvas();
219 }
220
208 GLRenderer::~GLRenderer() { 221 GLRenderer::~GLRenderer() {
209 while (!pending_async_read_pixels_.empty()) { 222 while (!pending_async_read_pixels_.empty()) {
210 pending_async_read_pixels_.back()->finished_read_pixels_callback.Cancel(); 223 pending_async_read_pixels_.back()->finished_read_pixels_callback.Cancel();
211 pending_async_read_pixels_.back()->copy_callback.Run( 224 pending_async_read_pixels_.back()->copy_callback.Run(
212 scoped_ptr<SkBitmap>()); 225 scoped_ptr<SkBitmap>());
213 pending_async_read_pixels_.pop_back(); 226 pending_async_read_pixels_.pop_back();
214 } 227 }
215 228
216 context_->setMemoryAllocationChangedCallbackCHROMIUM(NULL); 229 context_->setMemoryAllocationChangedCallbackCHROMIUM(NULL);
217 CleanupSharedObjects(); 230 CleanupSharedObjects();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 WebKit::WebGraphicsManagedMemoryStats stats; 267 WebKit::WebGraphicsManagedMemoryStats stats;
255 stats.bytesVisible = bytes_visible; 268 stats.bytesVisible = bytes_visible;
256 stats.bytesVisibleAndNearby = bytes_visible_and_nearby; 269 stats.bytesVisibleAndNearby = bytes_visible_and_nearby;
257 stats.bytesAllocated = bytes_allocated; 270 stats.bytesAllocated = bytes_allocated;
258 stats.backbufferRequested = !is_backbuffer_discarded_; 271 stats.backbufferRequested = !is_backbuffer_discarded_;
259 context_->sendManagedMemoryStatsCHROMIUM(&stats); 272 context_->sendManagedMemoryStatsCHROMIUM(&stats);
260 } 273 }
261 274
262 void GLRenderer::ReleaseRenderPassTextures() { render_pass_textures_.clear(); } 275 void GLRenderer::ReleaseRenderPassTextures() { render_pass_textures_.clear(); }
263 276
264 void GLRenderer::ViewportChanged() { is_viewport_changed_ = true; } 277 void GLRenderer::ViewportChanged() {
278 is_viewport_changed_ = true;
279 ReinitializeGrCanvas();
280 }
265 281
266 void GLRenderer::ClearFramebuffer(DrawingFrame* frame) { 282 void GLRenderer::ClearFramebuffer(DrawingFrame* frame) {
267 // On DEBUG builds, opaque render passes are cleared to blue to easily see 283 // On DEBUG builds, opaque render passes are cleared to blue to easily see
268 // regions that were not drawn on the screen. 284 // regions that were not drawn on the screen.
269 if (frame->current_render_pass->has_transparent_background) 285 if (frame->current_render_pass->has_transparent_background)
270 GLC(context_, context_->clearColor(0, 0, 0, 0)); 286 GLC(context_, context_->clearColor(0, 0, 0, 0));
271 else 287 else
272 GLC(context_, context_->clearColor(0, 0, 1, 1)); 288 GLC(context_, context_->clearColor(0, 0, 1, 1));
273 289
290 bool always_clear = true;
danakj 2013/05/15 20:33:16 omg thanks for this. i was meaning to do something
enne (OOO) 2013/05/15 22:34:38 Done.
274 #ifdef NDEBUG 291 #ifdef NDEBUG
275 if (frame->current_render_pass->has_transparent_background) 292 always_clear = false;
276 #endif 293 #endif
277 context_->clear(GL_COLOR_BUFFER_BIT); 294 if (always_clear || frame->current_render_pass->has_transparent_background) {
295 GLbitfield clear_bits = GL_COLOR_BUFFER_BIT;
296 if (CanUseGanesh())
297 clear_bits |= GL_STENCIL_BUFFER_BIT;
danakj 2013/05/15 20:33:16 Maybe a comment why? Cuz I know why we'd do this.
enne (OOO) 2013/05/15 22:34:38 Done.
298 context_->clear(clear_bits);
299 }
278 } 300 }
279 301
280 void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) { 302 void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) {
281 // FIXME: Remove this once backbuffer is automatically recreated on first use 303 // FIXME: Remove this once backbuffer is automatically recreated on first use
282 EnsureBackbuffer(); 304 EnsureBackbuffer();
283 305
284 if (ViewportSize().IsEmpty()) 306 if (ViewportSize().IsEmpty())
285 return; 307 return;
286 308
287 TRACE_EVENT0("cc", "GLRenderer::DrawLayers"); 309 TRACE_EVENT0("cc", "GLRenderer::DrawLayers");
288 if (is_viewport_changed_) { 310 if (is_viewport_changed_) {
289 // Only reshape when we know we are going to draw. Otherwise, the reshape 311 // Only reshape when we know we are going to draw. Otherwise, the reshape
290 // can leave the window at the wrong size if we never draw and the proper 312 // can leave the window at the wrong size if we never draw and the proper
291 // viewport size is never set. 313 // viewport size is never set.
292 is_viewport_changed_ = false; 314 is_viewport_changed_ = false;
293 output_surface_->Reshape(gfx::Size(ViewportWidth(), ViewportHeight())); 315 output_surface_->Reshape(gfx::Size(ViewportWidth(), ViewportHeight()));
294 } 316 }
295 317
296 MakeContextCurrent(); 318 MakeContextCurrent();
297 // Bind the common vertex attributes used for drawing all the layers.
298 shared_geometry_->PrepareForDraw();
299 319
300 GLC(context_, context_->disable(GL_DEPTH_TEST)); 320 ReinitializeGLState();
301 GLC(context_, context_->disable(GL_CULL_FACE));
302 GLC(context_, context_->colorMask(true, true, true, true));
303 GLC(context_, context_->enable(GL_BLEND));
304 blend_shadow_ = true;
305 GLC(context_, context_->blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA));
306 GLC(Context(), Context()->activeTexture(GL_TEXTURE0));
307 program_shadow_ = 0;
308 } 321 }
309 322
310 void GLRenderer::DoNoOp() { 323 void GLRenderer::DoNoOp() {
311 GLC(context_, context_->bindFramebuffer(GL_FRAMEBUFFER, 0)); 324 GLC(context_, context_->bindFramebuffer(GL_FRAMEBUFFER, 0));
312 GLC(context_, context_->flush()); 325 GLC(context_, context_->flush());
313 } 326 }
314 327
315 void GLRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) { 328 void GLRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) {
316 DCHECK(quad->rect.Contains(quad->visible_rect)); 329 DCHECK(quad->rect.Contains(quad->visible_rect));
317 if (quad->material != DrawQuad::TEXTURE_CONTENT) { 330 if (quad->material != DrawQuad::TEXTURE_CONTENT) {
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 Context()->uniform1i(program->fragment_shader().sampler_location(), 0)); 1474 Context()->uniform1i(program->fragment_shader().sampler_location(), 0));
1462 1475
1463 SetShaderOpacity(quad->opacity(), 1476 SetShaderOpacity(quad->opacity(),
1464 program->fragment_shader().alpha_location()); 1477 program->fragment_shader().alpha_location());
1465 DrawQuadGeometry(frame, 1478 DrawQuadGeometry(frame,
1466 quad->quadTransform(), 1479 quad->quadTransform(),
1467 quad->rect, 1480 quad->rect,
1468 program->vertex_shader().matrix_location()); 1481 program->vertex_shader().matrix_location());
1469 } 1482 }
1470 1483
1484 void GLRenderer::DrawPictureQuadDirectToBackbuffer(
1485 const DrawingFrame* frame,
1486 const PictureDrawQuad* quad) {
1487 DCHECK(CanUseGanesh());
1488
1489 // TODO(enne): Only do this if we've set some state since the last time
1490 // Ganesh drew anything.
1491 gr_context_->resetContext();
1492
1493 // Reset the canvas matrix to identity because the clip rect is in target
1494 // space.
1495 SkMatrix sk_identity;
1496 sk_identity.setIdentity();
1497 sk_canvas_->setMatrix(sk_identity);
1498
1499 if (is_scissor_enabled_) {
1500 sk_canvas_->clipRect(gfx::RectToSkRect(scissor_rect_),
1501 SkRegion::kReplace_Op);
1502 } else {
1503 sk_canvas_->clipRect(gfx::RectToSkRect(gfx::Rect(ViewportSize())),
1504 SkRegion::kReplace_Op);
1505 }
1506
1507 gfx::Transform contents_device_transform = frame->window_matrix *
1508 frame->projection_matrix * quad->quadTransform();
1509 contents_device_transform.Translate(quad->rect.x(),
1510 quad->rect.y());
1511 contents_device_transform.FlattenTo2d();
1512 SkMatrix sk_device_matrix;
1513 gfx::TransformToFlattenedSkMatrix(contents_device_transform,
1514 &sk_device_matrix);
1515 sk_canvas_->setMatrix(sk_device_matrix);
1516
1517 quad->picture_pile->Raster(
danakj 2013/05/15 20:33:16 RasterToScreen? I don't like qualifying one name
enne (OOO) 2013/05/15 22:34:38 It's really more "RasterDirect" vs. "RasterTo(Inte
1518 sk_canvas_.get(), quad->content_rect, quad->contents_scale, NULL);
1519
1520 // Flush any drawing buffers that have been deferred.
1521 sk_canvas_->flush();
danakj 2013/05/15 20:33:16 I think you want to flush the GL context after the
enne (OOO) 2013/05/15 22:34:38 This is a canvas flush not a context flush. Ganes
1522 ReinitializeGLState();
danakj 2013/05/15 20:33:16 Do you want to do all this flushing and state sett
enne (OOO) 2013/05/15 22:34:38 More than the TODO on line 1489?
1523 }
1524
1471 void GLRenderer::DrawPictureQuad(const DrawingFrame* frame, 1525 void GLRenderer::DrawPictureQuad(const DrawingFrame* frame,
1472 const PictureDrawQuad* quad) { 1526 const PictureDrawQuad* quad) {
1527 if (quad->draw_direct_to_backbuffer && CanUseGanesh()) {
1528 DrawPictureQuadDirectToBackbuffer(frame, quad);
1529 return;
1530 }
1531
1473 if (on_demand_tile_raster_bitmap_.width() != quad->texture_size.width() || 1532 if (on_demand_tile_raster_bitmap_.width() != quad->texture_size.width() ||
1474 on_demand_tile_raster_bitmap_.height() != quad->texture_size.height()) { 1533 on_demand_tile_raster_bitmap_.height() != quad->texture_size.height()) {
1475 on_demand_tile_raster_bitmap_.setConfig( 1534 on_demand_tile_raster_bitmap_.setConfig(
1476 SkBitmap::kARGB_8888_Config, 1535 SkBitmap::kARGB_8888_Config,
1477 quad->texture_size.width(), 1536 quad->texture_size.width(),
1478 quad->texture_size.height()); 1537 quad->texture_size.height());
1479 on_demand_tile_raster_bitmap_.allocPixels(); 1538 on_demand_tile_raster_bitmap_.allocPixels();
1480 1539
1481 if (on_demand_tile_raster_resource_id_) 1540 if (on_demand_tile_raster_resource_id_)
1482 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); 1541 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_);
1483 1542
1484 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( 1543 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture(
1485 quad->texture_size, 1544 quad->texture_size,
1486 GL_RGBA, 1545 GL_RGBA,
1487 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, 1546 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM,
1488 ResourceProvider::TextureUsageAny); 1547 ResourceProvider::TextureUsageAny);
1489 } 1548 }
1490 1549
1491 SkDevice device(on_demand_tile_raster_bitmap_); 1550 SkDevice device(on_demand_tile_raster_bitmap_);
1492 SkCanvas canvas(&device); 1551 SkCanvas canvas(&device);
1493 1552
1494 quad->picture_pile->Raster(&canvas, quad->content_rect, quad->contents_scale, 1553 quad->picture_pile->RasterToBitmap(&canvas, quad->content_rect,
1495 NULL); 1554 quad->contents_scale, NULL);
1496 1555
1497 resource_provider_->SetPixels( 1556 resource_provider_->SetPixels(
1498 on_demand_tile_raster_resource_id_, 1557 on_demand_tile_raster_resource_id_,
1499 reinterpret_cast<uint8_t*>(on_demand_tile_raster_bitmap_.getPixels()), 1558 reinterpret_cast<uint8_t*>(on_demand_tile_raster_bitmap_.getPixels()),
1500 gfx::Rect(quad->texture_size), 1559 gfx::Rect(quad->texture_size),
1501 gfx::Rect(quad->texture_size), 1560 gfx::Rect(quad->texture_size),
1502 gfx::Vector2d()); 1561 gfx::Vector2d());
1503 1562
1504 DrawContentQuad(frame, quad, on_demand_tile_raster_resource_id_); 1563 DrawContentQuad(frame, quad, on_demand_tile_raster_resource_id_);
1505 } 1564 }
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 2851
2793 if (offscreen_framebuffer_id_) 2852 if (offscreen_framebuffer_id_)
2794 GLC(context_, context_->deleteFramebuffer(offscreen_framebuffer_id_)); 2853 GLC(context_, context_->deleteFramebuffer(offscreen_framebuffer_id_));
2795 2854
2796 if (on_demand_tile_raster_resource_id_) 2855 if (on_demand_tile_raster_resource_id_)
2797 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); 2856 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_);
2798 2857
2799 ReleaseRenderPassTextures(); 2858 ReleaseRenderPassTextures();
2800 } 2859 }
2801 2860
2861 void GLRenderer::ReinitializeGrCanvas() {
2862 if (!CanUseGanesh())
2863 return;
2864
2865 GrBackendRenderTargetDesc desc;
2866 desc.fWidth = ViewportWidth();
2867 desc.fHeight = ViewportHeight();
2868 desc.fConfig = kRGBA_8888_GrPixelConfig;
2869 desc.fOrigin = kTopLeft_GrSurfaceOrigin;
2870 desc.fSampleCnt = 1;
2871 desc.fStencilBits = 8;
2872 desc.fRenderTargetHandle = 0;
2873
2874 SkAutoTUnref<GrSurface> surface(
danakj 2013/05/15 20:33:16 skia::RefPtr instead for these please
enne (OOO) 2013/05/15 22:34:38 Done.
2875 gr_context_->wrapBackendRenderTarget(desc));
2876 SkAutoTUnref<SkDevice> device(SkGpuDevice::Create(surface));
2877 sk_canvas_.reset(new SkCanvas(device.get()));
2878 }
2879
2880 void GLRenderer::ReinitializeGLState() {
2881 // Bind the common vertex attributes used for drawing all the layers.
2882 shared_geometry_->PrepareForDraw();
2883
2884 GLC(context_, context_->disable(GL_STENCIL_TEST));
2885 GLC(context_, context_->disable(GL_DEPTH_TEST));
2886 GLC(context_, context_->disable(GL_CULL_FACE));
2887 GLC(context_, context_->colorMask(true, true, true, true));
2888 GLC(context_, context_->enable(GL_BLEND));
2889 blend_shadow_ = true;
2890 GLC(context_, context_->blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA));
2891 GLC(context_, context_->activeTexture(GL_TEXTURE0));
2892 program_shadow_ = 0;
2893
2894 // Make sure scissoring starts as disabled.
2895 is_scissor_enabled_ = false;
danakj 2013/05/15 20:33:16 What if scissoring is enabled to clip to some pare
enne (OOO) 2013/05/15 22:34:38 At the point this call is made, the gl scissor pro
2896 GLC(context_, context_->disable(GL_SCISSOR_TEST));
2897 }
2898
2899 bool GLRenderer::CanUseGanesh() const {
2900 return gr_context_ && context_->getContextAttributes().stencil;
danakj 2013/05/15 20:33:16 An explanatory comment re: stencil here as well?
enne (OOO) 2013/05/15 22:34:38 Done.
2901 }
2902
2802 bool GLRenderer::IsContextLost() { 2903 bool GLRenderer::IsContextLost() {
2803 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); 2904 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR);
2804 } 2905 }
2805 2906
2806 } // namespace cc 2907 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698