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

Side by Side Diff: ppapi/proxy/video_decoder_resource_unittest.cc

Issue 2136743002: Simplify ppapi Graphics3D size propagation a bit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_attr_parse_to_pepper
Patch Set: fix win64+gyp build Created 4 years, 5 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 | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/shared_impl/DEPS » ('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 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 return result; 103 return result;
104 } 104 }
105 105
106 PP_Resource CreateGraphics3d() { 106 PP_Resource CreateGraphics3d() {
107 ProxyAutoLock lock; 107 ProxyAutoLock lock;
108 108
109 HostResource host_resource; 109 HostResource host_resource;
110 host_resource.SetHostResource(pp_instance(), kGraphics3D); 110 host_resource.SetHostResource(pp_instance(), kGraphics3D);
111 scoped_refptr<ppapi::proxy::Graphics3D> graphics_3d( 111 scoped_refptr<ppapi::proxy::Graphics3D> graphics_3d(
112 new ppapi::proxy::Graphics3D(host_resource)); 112 new ppapi::proxy::Graphics3D(host_resource, gfx::Size(640, 480)));
113 return graphics_3d->GetReference(); 113 return graphics_3d->GetReference();
114 } 114 }
115 115
116 PP_Resource CreateAndInitializeDecoder() { 116 PP_Resource CreateAndInitializeDecoder() {
117 PP_Resource decoder = CreateDecoder(); 117 PP_Resource decoder = CreateDecoder();
118 LockingResourceReleaser graphics3d(CreateGraphics3d()); 118 LockingResourceReleaser graphics3d(CreateGraphics3d());
119 MockCompletionCallback cb; 119 MockCompletionCallback cb;
120 int32_t result = decoder_iface()->Initialize( 120 int32_t result = decoder_iface()->Initialize(
121 decoder, 121 decoder,
122 graphics3d.get(), 122 graphics3d.get(),
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 ASSERT_FALSE(uncalled_cb.called()); 582 ASSERT_FALSE(uncalled_cb.called());
583 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallFlush(decoder.get(), &uncalled_cb)); 583 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallFlush(decoder.get(), &uncalled_cb));
584 ASSERT_FALSE(uncalled_cb.called()); 584 ASSERT_FALSE(uncalled_cb.called());
585 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallReset(decoder.get(), &uncalled_cb)); 585 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallReset(decoder.get(), &uncalled_cb));
586 ASSERT_FALSE(uncalled_cb.called()); 586 ASSERT_FALSE(uncalled_cb.called());
587 } 587 }
588 #endif // !defined(OS_WIN) || !defined(ARCH_CPU_64_BITS) 588 #endif // !defined(OS_WIN) || !defined(ARCH_CPU_64_BITS)
589 589
590 } // namespace proxy 590 } // namespace proxy
591 } // namespace ppapi 591 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/shared_impl/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698