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

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

Issue 61553006: Rename WebKit namespace to blink (part 5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "third_party/skia/include/core/SkColorFilter.h" 47 #include "third_party/skia/include/core/SkColorFilter.h"
48 #include "third_party/skia/include/core/SkSurface.h" 48 #include "third_party/skia/include/core/SkSurface.h"
49 #include "third_party/skia/include/gpu/GrContext.h" 49 #include "third_party/skia/include/gpu/GrContext.h"
50 #include "third_party/skia/include/gpu/GrTexture.h" 50 #include "third_party/skia/include/gpu/GrTexture.h"
51 #include "third_party/skia/include/gpu/SkGpuDevice.h" 51 #include "third_party/skia/include/gpu/SkGpuDevice.h"
52 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h" 52 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h"
53 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" 53 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
54 #include "ui/gfx/quad_f.h" 54 #include "ui/gfx/quad_f.h"
55 #include "ui/gfx/rect_conversions.h" 55 #include "ui/gfx/rect_conversions.h"
56 56
57 using WebKit::WebGraphicsContext3D; 57 using blink::WebGraphicsContext3D;
58 58
59 namespace cc { 59 namespace cc {
60 60
61 namespace { 61 namespace {
62 62
63 // TODO(epenner): This should probably be moved to output surface. 63 // TODO(epenner): This should probably be moved to output surface.
64 // 64 //
65 // This implements a simple fence based on client side swaps. 65 // This implements a simple fence based on client side swaps.
66 // This is to isolate the ResourceProvider from 'frames' which 66 // This is to isolate the ResourceProvider from 'frames' which
67 // it shouldn't need to care about, while still allowing us to 67 // it shouldn't need to care about, while still allowing us to
(...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 } 2274 }
2275 2275
2276 unsigned buffer = context_->createBuffer(); 2276 unsigned buffer = context_->createBuffer();
2277 GLC(context_, context_->bindBuffer(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM, 2277 GLC(context_, context_->bindBuffer(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM,
2278 buffer)); 2278 buffer));
2279 GLC(context_, context_->bufferData(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM, 2279 GLC(context_, context_->bufferData(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM,
2280 4 * window_rect.size().GetArea(), 2280 4 * window_rect.size().GetArea(),
2281 NULL, 2281 NULL,
2282 GL_STREAM_READ)); 2282 GL_STREAM_READ));
2283 2283
2284 WebKit::WebGLId query = 0; 2284 blink::WebGLId query = 0;
2285 if (is_async) { 2285 if (is_async) {
2286 query = context_->createQueryEXT(); 2286 query = context_->createQueryEXT();
2287 GLC(context_, context_->beginQueryEXT( 2287 GLC(context_, context_->beginQueryEXT(
2288 GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, 2288 GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM,
2289 query)); 2289 query));
2290 } 2290 }
2291 2291
2292 GLC(context_, 2292 GLC(context_,
2293 context_->readPixels(window_rect.x(), 2293 context_->readPixels(window_rect.x(),
2294 window_rect.y(), 2294 window_rect.y(),
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2965 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas 2965 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas
2966 // implementation. 2966 // implementation.
2967 return gr_context_ && context_->getContextAttributes().stencil; 2967 return gr_context_ && context_->getContextAttributes().stencil;
2968 } 2968 }
2969 2969
2970 bool GLRenderer::IsContextLost() { 2970 bool GLRenderer::IsContextLost() {
2971 return output_surface_->context_provider()->IsContextLost(); 2971 return output_surface_->context_provider()->IsContextLost();
2972 } 2972 }
2973 2973
2974 } // namespace cc 2974 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698