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

Side by Side Diff: mojo/examples/bitmap_uploader/bitmap_uploader.cc

Issue 668483002: Change mojo URLs from mojo://mojo_foo to mojo://foo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/examples/bitmap_uploader/bitmap_uploader.h" 5 #include "mojo/examples/bitmap_uploader/bitmap_uploader.h"
6 6
7 #ifndef GL_GLEXT_PROTOTYPES 7 #ifndef GL_GLEXT_PROTOTYPES
8 #define GL_GLEXT_PROTOTYPES 8 #define GL_GLEXT_PROTOTYPES
9 #endif // GL_GLEXT_PROTOTYPES 9 #endif // GL_GLEXT_PROTOTYPES
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 BitmapUploader::BitmapUploader(View* view) 39 BitmapUploader::BitmapUploader(View* view)
40 : view_(view), 40 : view_(view),
41 color_(SK_ColorTRANSPARENT), 41 color_(SK_ColorTRANSPARENT),
42 next_resource_id_(1u), 42 next_resource_id_(1u),
43 weak_factory_(this) { 43 weak_factory_(this) {
44 } 44 }
45 45
46 void BitmapUploader::Init(Shell* shell) { 46 void BitmapUploader::Init(Shell* shell) {
47 ServiceProviderPtr surfaces_service_provider; 47 ServiceProviderPtr surfaces_service_provider;
48 shell->ConnectToApplication("mojo:mojo_surfaces_service", 48 shell->ConnectToApplication("mojo:surfaces_service",
49 GetProxy(&surfaces_service_provider)); 49 GetProxy(&surfaces_service_provider));
50 ConnectToService(surfaces_service_provider.get(), &surfaces_service_); 50 ConnectToService(surfaces_service_provider.get(), &surfaces_service_);
51 ServiceProviderPtr gpu_service_provider; 51 ServiceProviderPtr gpu_service_provider;
52 shell->ConnectToApplication("mojo:mojo_native_viewport_service", 52 shell->ConnectToApplication("mojo:native_viewport_service",
53 GetProxy(&gpu_service_provider)); 53 GetProxy(&gpu_service_provider));
54 ConnectToService(gpu_service_provider.get(), &gpu_service_); 54 ConnectToService(gpu_service_provider.get(), &gpu_service_);
55 55
56 surfaces_service_->CreateSurfaceConnection(base::Bind( 56 surfaces_service_->CreateSurfaceConnection(base::Bind(
57 &BitmapUploader::OnSurfaceConnectionCreated, weak_factory_.GetWeakPtr())); 57 &BitmapUploader::OnSurfaceConnectionCreated, weak_factory_.GetWeakPtr()));
58 CommandBufferPtr gles2_client; 58 CommandBufferPtr gles2_client;
59 gpu_service_->CreateOffscreenGLES2Context(GetProxy(&gles2_client)); 59 gpu_service_->CreateOffscreenGLES2Context(GetProxy(&gles2_client));
60 gles2_context_ = 60 gles2_context_ =
61 MojoGLES2CreateContext(gles2_client.PassMessagePipe().release().value(), 61 MojoGLES2CreateContext(gles2_client.PassMessagePipe().release().value(),
62 &LostContext, 62 &LostContext,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 size.height(), 224 size.height(),
225 0, 225 0,
226 TextureFormat(), 226 TextureFormat(),
227 GL_UNSIGNED_BYTE, 227 GL_UNSIGNED_BYTE,
228 0); 228 0);
229 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 229 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
230 return texture; 230 return texture;
231 } 231 }
232 232
233 } // namespace mojo 233 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698